tobyatgithub / ReadalongsDesktop

A desktop GUI app for readalongs to help indigenous communities teach and pass on their languages.
MIT License
3 stars 2 forks source link

Incompatibility with PySide2 #9

Open joanise opened 2 years ago

joanise commented 2 years ago

I am testing on Windows, with PySide2 as the Qt shim.

In cmd:

python3 -m venv venv
.\venv\Scripts\Activate.bat
pip install qtpy
pip install readalongs
pip install pyside2

If you have other Qt shim installed, you might need to force the use of pyside2 by setting the QT_API environment variable to pyside2

set QT_API=pyside2

When I try to run the desktop app, I get this trace dump:

> python desktopApp.py
Traceback (most recent call last):
  File "desktopApp.py", line 376, in <module>
    main()
  File "desktopApp.py", line 365, in main
    view = readalongsUI()
  File "desktopApp.py", line 94, in __init__
    self._createButtons()
  File "desktopApp.py", line 179, in _createButtons
    self.NextButton.setSizePolicy(100, 120)
TypeError: 'PySide2.QtWidgets.QWidget.setSizePolicy' called with wrong argument types:
  PySide2.QtWidgets.QWidget.setSizePolicy(int, int)
Supported signatures:
  PySide2.QtWidgets.QWidget.setSizePolicy(PySide2.QtWidgets.QSizePolicy)
  PySide2.QtWidgets.QWidget.setSizePolicy(PySide2.QtWidgets.QSizePolicy.Policy, PySide2.QtWidgets.QSizePolicy.Policy)
joanise commented 2 years ago

In case it's helpful in troubleshooting / reproducing:

>pip freeze
aniso8601==9.0.1
cachelib==0.4.1
certifi==2021.10.8
charset-normalizer==2.0.7
chevron==0.14.0
click==8.0.3
colorama==0.4.4
coloredlogs==10.0
decorator==5.1.0
dnspython==1.16.0
docopt==0.6.2
editdistance==0.6.0
et-xmlfile==1.1.0
eventlet==0.30.2
Flask==2.0.2
Flask-Cors==3.0.9
Flask-RESTful==0.3.9
Flask-Session==0.3.2
Flask-SocketIO==4.3.2
flask-talisman==0.8.1
g2p==0.5.20210825
greenlet==1.1.2
gunicorn==20.1.0
humanfriendly==10.0
idna==3.3
importlib-metadata==4.8.1
itsdangerous==2.0.1
Jinja2==3.0.2
lxml==4.6.3
MarkupSafe==2.0.1
munkres==1.1.4
networkx==2.5
numpy==1.21.3
openpyxl==3.0.9
panphon==0.19
pydub==0.23.1
pympi-ling==1.69
pyreadline==2.1
PySide2==5.15.2
python-engineio==3.14.2
python-slugify==5.0.0
python-socketio==4.6.1
pytz==2021.3
PyYAML==6.0
QtPy==1.11.2
readalongs==0.1.20211013
regex==2021.10.23
requests==2.26.0
shiboken2==5.15.2
six==1.12.0
soundswallower==0.1.1
text-unidecode==1.3
tqdm==4.31.1
typing-extensions==3.10.0.2
unicodecsv==0.14.1
urllib3==1.26.7
webvtt-py==0.4.2
Werkzeug==2.0.2
zipp==3.6.0