I'm building an app using Python 3.6 and PyQt5.
I was on Ubuntu 16.04 I used to make HTTP request using QNetworkReply and QNetworkRequest from QtNetwork like so :
@pyqtSlot('QNetworkReply*')
def receiveReply(self, reply):
buffer = reply.readAll()
if (reply.error() != QNetworkReply.NoError):
print("API - Error " + str(reply.error()) + " : " + buffer.data().decode('utf8'))
self.networkManager.clearAccessCache()
else:
print('yeah !')
reply.deleteLater()
@pyqtSlot()
def sendRequest(self):
request = QNetworkRequest(QUrl("https://www.google.fr"))
self.networkManager.get(request)
(I'm showing a simplified version of my code that still throw the error)
Since I upgraded my OS to Ubuntu 18.04 I'm getting an error 99 (QNetworkReply::UnknownNetworkError) from the QNetworkReply everytime I'm making a request to a HTTPS url.
But if, in the example, I replace https://www.google.fr by http://www.google.fr it works perfectly.
I'm guessing it has to deal with HTTPS url in general but I can't find why it's happening on Ubuntu 18.
Thanks in advance if someone can help me !
Thanks to eyllanesc, here is the solution :
pip3 uninstall pyqt5
sudo apt-get install python3-pyqt5