Endilll/vapoursynth-preview

vspreview not compatible with PyQt5 >=5.15.4

Closed this issue · 6 comments

Here is the tracelog

run script.py
Traceback (most recent call last):
  File "C:\Users\Varde\AppData\Roaming\Python\Python39\Scripts\vapoursynth-preview\run.py", line 2, in <module>
    from vspreview import main
  File "C:\Users\Varde\AppData\Roaming\Python\Python39\Scripts\vapoursynth-preview\vspreview\__init__.py", line 1, in <module>
    from .main import main
  File "C:\Users\Varde\AppData\Roaming\Python\Python39\Scripts\vapoursynth-preview\vspreview\main.py", line 12, in <module>
    from vspreview.core import (
  File "C:\Users\Varde\AppData\Roaming\Python\Python39\Scripts\vapoursynth-preview\vspreview\core\__init__.py", line 1, in <module>
    from .abstracts import (
  File "C:\Users\Varde\AppData\Roaming\Python\Python39\Scripts\vapoursynth-preview\vspreview\core\abstracts.py", line 19, in <module>
    class AbstractMainWindow(Qt.QMainWindow, QAbstractYAMLObjectSingleton):
AttributeError: module 'PyQt5.Qt' has no attribute 'QMainWindow

Maybe because it's deprecated? I took a look at the doc and it seems to be PyQt5.QtWidgets.QMainWindow now.

Are there any symbols present in PyQt5.Qt?
I've been using 5.15.4 myself, and I never ran into such issue.
I can't find anything about it being deprecated in PyQt5 documentation, too.

Are there any symbols present in PyQt5.Qt?

Hum, I don't know... I can't open Qt.pyd nor find it in the docs.

I can't find anything about it being deprecated in PyQt5 documentation, too.

I can't find anything about QMainWindow implemented in PyQt5.Qt though. All the examples I find on internet use PyQt5.QtWidgets.QMainWindow.

I mean output of dir(PyQt5.Qt) after importing PyQt5.Qt.
Qt is a convenience module that supposed to just import everything from QtCore, QtGui, QtWidgets and so on, so users don't have to remember which part of the Qt every class belongs to.

dir(PyQt5.Qt)
Same error with 5.15.4
5.15.3 import all components correctly.

Also, I'm not sure if it can be related but doing clean installs give me this:

pip install PyQt5==5.15.3
Installing collected packages: PyQt5-sip, PyQt5-Qt, PyQt5
Successfully installed PyQt5-5.15.3 PyQt5-Qt-5.15.2 PyQt5-sip-12.9.0
pip install PyQt5==5.15.4
Installing collected packages: PyQt5-sip, PyQt5
Successfully installed PyQt5-5.15.4 PyQt5-sip-12.9.0

PyQt5-Qt isn't installed with 5.15.4 and even installing it manually afterward doesn't fix it...

Okay, when installing the lastest version of PyQt5, pip3.9 checks on python38 folder too

C:\>pip install PyQt5 --user
Collecting PyQt5
  Downloading PyQt5-5.15.4-cp36.cp37.cp38.cp39-none-win_amd64.whl (6.8 MB)
     |████████████████████████████████| 6.8 MB 6.8 MB/s
Requirement already satisfied: PyQt5-Qt5>=5.15 in c:\program files\python38\lib\site-packages (from PyQt5) (5.15.2)
Collecting PyQt5-sip<13,>=12.8
  Downloading PyQt5_sip-12.9.0-cp39-cp39-win_amd64.whl (63 kB)
     |████████████████████████████████| 63 kB 938 kB/s
Installing collected packages: PyQt5-sip, PyQt5
Successfully installed PyQt5-5.15.4 PyQt5-sip-12.9.0

See the line Requirement already satisfied: PyQt5-Qt5>=5.15 in c:\program files\python38\lib\site-packages (from PyQt5) (5.15.2)

I deleted the folders and it works now. Sorry about that

I ran pip install -r requirements.txt on a machine with almost clean python 3.9 installation (no traces of Qt), and got all three PyQt5-5.15.4, PyQt5_Qt5-5.15.2, and QtPy-1.9.0. VSP runs just fine on that machine now.