BasioMeusPuga / Lector

Qt based ebook reader
GNU General Public License v3.0
1.51k stars 207 forks source link

TypeError: toFillPolygon(self, QTransform): not enough arguments with pyqt 5.7 #51

Closed unhammer closed 6 years ago

unhammer commented 6 years ago

On Xubuntu 17.10, I installed dependencies with

sudo apt install python3-pyqt5.qtmultimedia (which deps on python3-pyqt5), and got:

$ lector/__main__.py 
python-poppler-qt5 is not installed. Pdf files will not work.
Locale: nn_NO (No translations found)
Database: No paths for settings...
Traceback (most recent call last):
  File "lector/__main__.py", line 986, in <module>
    main()
  File "lector/__main__.py", line 979, in main
    form = MainUI()
  File "lector/__main__.py", line 105, in __init__
    self.metadataDialog = MetadataUI(self)
  File "/home/kiwibird/src/Lector/lector/metadatadialog.py", line 39, in __init__
    mask = QtGui.QRegion(path.toFillPolygon().toPolygon())
TypeError: toFillPolygon(self, QTransform): not enough arguments

my versions:

$ dpkg -l '*pyqt5*'|grep ^ii
ii  python3-pyqt5              5.7+dfsg-6   amd64        Python 3 bindings for Qt5
ii  python3-pyqt5.qtmultimedia 5.7+dfsg-6   amd64        Python 3 bindings for Qt5's Multimedia module

on ebc3ef9f1b11e76ca9a0f23a55124f79c6faa343

BasioMeusPuga commented 6 years ago

Please check the readme. This is a versioning issue. You need PyQt 5.10+. 18.04 comes with that, I believe.

But I've pushed some code that should let you bypass this. I can't however, guarantee that other things will continue to work on 5.7.

unhammer commented 6 years ago

Hey, after 3e54340694b75c8deddb88770fed6d81e56b07b5 it does seem to work, great =D