vapoursynth-preview icon indicating copy to clipboard operation
vapoursynth-preview copied to clipboard

Cannot start vspreview

Open EleonoreMizo opened this issue 4 years ago • 6 comments
trafficstars

I cannot start VS Preview (Win 7 64 bits). README.md says that only Python 3.8 is required but the warning from the log tells something different and I don’t know if this is the cause of the problem:

2021-10-14 11:16:54.407: WARNING: VSPreview is not tested on Python versions prior to 3.9, but you have 3.8.0 final. Use at your own risk.
2021-10-14 11:16:54.422: DEBUG: Reading QSS file in: :qdarkstyle\dark\style.qss
2021-10-14 11:16:54.422: INFO: QSS file sucessfuly loaded.
2021-10-14 11:16:54.423: DEBUG: Checking patches for being applied.
2021-10-14 11:16:54.423: INFO: Found version patches to be applied.
2021-10-14 11:16:54.423: INFO: Found application patches to be applied.
Traceback (most recent call last):
  File "C:\Program Files\Vapoursynth Preview\run.py", line 4, in <module>
    main()
  File "C:\Program Files\Vapoursynth Preview\vspreview\main.py", line 843, in main
    main_window = MainWindow()
  File "C:\Program Files\Vapoursynth Preview\vspreview\core\bases.py", line 24, in __call__
    cls.instance = super().__call__(*args, **kwargs)
  File "C:\Program Files\Vapoursynth Preview\vspreview\core\better_abc.py", line 25, in __call__
    instance = NativeABCMeta.__call__(cls, *args, **kwargs)
  File "C:\Program Files\Vapoursynth Preview\vspreview\main.py", line 413, in __init__
    self.toolbars = Toolbars(self)
  File "C:\Program Files\Vapoursynth Preview\vspreview\core\bases.py", line 24, in __call__
    cls.instance = super().__call__(*args, **kwargs)
  File "C:\Program Files\Vapoursynth Preview\vspreview\core\better_abc.py", line 25, in __call__
    instance = NativeABCMeta.__call__(cls, *args, **kwargs)
  File "C:\Program Files\Vapoursynth Preview\vspreview\main.py", line 280, in __init__
    self.pipette   =   PipetteToolbar(main_window)
  File "C:\Program Files\Vapoursynth Preview\vspreview\core\better_abc.py", line 25, in __call__
    instance = NativeABCMeta.__call__(cls, *args, **kwargs)
  File "C:\Program Files\Vapoursynth Preview\vspreview\toolbars\pipette.py", line 46, in __init__
    self.outputs = WeakKeyDictionary[Output, vs.VideoNode]()
TypeError: 'ABCMeta' object is not subscriptable

EleonoreMizo avatar Oct 14 '21 09:10 EleonoreMizo

Thank you for pointing out to stale readme. It says the same as warnings now. Can you upgrade to 3.9 and try again?

Endilll avatar Oct 14 '21 09:10 Endilll

3.8 is the latest win7 supported version. Maybe its possible to compile 3.9 for win7, but I never tried.

DJATOM avatar Oct 14 '21 09:10 DJATOM

Indeed sorry I haven’t any Win 10 rig here so I cannot install Python 3.9 to test.

EleonoreMizo avatar Oct 14 '21 10:10 EleonoreMizo

From this thread , it seems that you can’t add type annotations to abstract base classes in collections.abc. WeakKeyDictionary inherits from collections.abc.MutableMapping so that’s why it doesn’t work in Python 3.8.

https://github.com/Endilll/vapoursynth-preview/blob/4c2c056eec82a29e68ad2b79e88e30ec52ee0a33/vspreview/toolbars/pipette.py#L46

Quick and dirty fix is just removing the annotations of it like this self.outputs = WeakKeyDictionary()

@EleonoreMizo Minor, but you should update to the latest update of 3.8. Friends have a lot of weird issues with 3.8.0 and none with 3.8.10. 3.8.11 and 3.8.12 are just security updates and you can probably skip them. 3.8.10 should be good enough.

Ichunjo avatar Oct 14 '21 12:10 Ichunjo

Thanks for the tip. Unfortunately this leads to other errors, so I guess it’s probably a dead end without Python 3.9.

EleonoreMizo avatar Oct 14 '21 20:10 EleonoreMizo

It worked fine for me using 3.8.10. It was on Windows Server 2019 though.

Ichunjo avatar Oct 14 '21 20:10 Ichunjo