Trilarion / imperialism-remake

Imperialism remake
https://remake.twelvepm.de/
GNU General Public License v3.0
53 stars 19 forks source link

AttributeError: type object 'QDataStream' has no attribute 'Qt_5_6' #9

Closed Trilarion closed 6 years ago

Trilarion commented 6 years ago

I'm getting this message on Ubuntu 16.04LTS with pip3 install python3-pyqt5 and pip3 install python3-pyqt5.qtmultimedia.

Traceback (most recent call last): File "/home/ubuntu/imperialism_remake/lib/network.py", line 231, in _new_connection def _new_connection(self): KeyboardInterrupt Traceback (most recent call last): File "/home/ubuntu/imperialism_remake/client/client.py", line 398, in local_network_connect tools.get_option(constants.Option.LOCALCLIENT_NAME)) File "/home/ubuntu/imperialism_remake/base/network.py", line 148, in send super().send(letter) File "/home/ubuntu/imperialism_remake/lib/network.py", line 170, in send writer.setVersion(QtCore.QDataStream.Qt_5_6) AttributeError: type object 'QDataStream' has no attribute 'Qt_5_6'

Looks like the used Qt version is too low.

We should:

Trilarion commented 6 years ago

According to https://packages.ubuntu.com/xenial/python3-pyqt5 I have Qt 5.5.1.

krs013 commented 6 years ago

That's odd... I installed with pip3 install pyqt5 and I have Qt 5.8.0.

krs013 commented 6 years ago

@Trilarion, I'm not familiar with that form of installing pyqt5. When I enter the same commands, pip3 only returns an error No matching distribution found for ...

Did you use pip to install those packages? They look more like Ubuntu packages that were installed with apt or apt-get, and those typically lag behind a few versions.

Trilarion commented 6 years ago

Sorry, I was using apt-get instead of pip3, so I got the older packages from the Ubuntu universe.

The solution to this bug should be as follows: