New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error with pyside6 6.4.0 backend on macOS arm64 #2407
Comments
Just so we keep a record: see related #2335 and #2406. It seems like we might need to add yet another test environment for pyside2 (based on #2406). For this PySide6 stuff I'm hoping we can just live with user testing for now. I can't find it right now but I believe there was another issue around with someone getting a seg fault on macOS with Qt6 installed. That might have been specific to their environment though. @psobolewskiPhD do you or someone on the napari team (@brisvag?) think you could add a new CI environment to vispy that uses pyside2 to run the examples? Or if you want pyside6 instead? |
At least from a napari PoV Qt6 (so pyside6) is really experimental and not officially supported. But pyside2 is supported and maybe even cleaner from a licensing PoV, so I think CI tests with it would be a good idea. napari tests windows and ubuntu with PySide2==5.15.2.1 and ubuntu with pyside6, so this issue could be mac specific or conda-forge specific or version specific. |
Based on some sleuthing by @Czaki I tried python 3.10 and pyside6 (latest, 6.4.0) but it still gave the same error. However! Using pyside6 6.3.0 and 6.3.2 was fine, so this issue is specific to something that's changed in pyside 6 6.4.0 . I've edited the title. |
Yes. This is pyside 6.4.0 proble and requires a new qtpy release |
Unfortunately installing that PR doesn't solve this issue. Again it's puzzling because it's in the docs: |
could you show traceback? |
Traceback is in the OP and yes both 6.3.0 and 6.3.2 work (#2407 (comment)) |
Could you report it to vispy? |
How? This is a vispy issue... Sorry if i'm missing something, it's been a long day. |
It is a long day, and this is the proper diagnosis for me. I war pretty sure that I'm in napari repository. |
@psobolewskiPhD I'm trying to look through pyside6 source code, but their git web UI is not helpful. Since I don't see it defined here, what are the minimal number of steps to reproduce this (what commands create the environment)? Are you able to do an import of the exact PySide6 module and access this attribute it is failing on?
|
Scratch that code, try this:
This "SwapBehavior" version matches what vispy is doing for PyQt6 so maybe PySide6 6.4.0+ is matching PyQt6 for this interface...or something similar. |
Replicating the env:
Here's the output I get on my arm64 macOS 12.6:
|
Great! I see the same thing on my Ubuntu system. Note that the vispy installation isn't actually necessary for this simple test. So it looks like PySide6 6.4.0 uses the same interfaces as PyQt6. This should be a simple but yet another version check we need to do in I think the main change is here: vispy/vispy/app/backends/_qt.py Lines 281 to 287 in 8bf4f9e
I'm not sure if this is the only change. We may need to rename |
Awesome 👏 |
@djhoese I ran your tests on PySide6 6.3.2:
So if I'm understanding correctly, so it looks like Edit: will make a different issue for the |
I've used both approaches:
Or just using PYSIDE6_API along side PYQT6 for the SwapBehavior related to DoubleBuffer:
I will try and figure out when the change was made in pyside6. |
Edit: made issue #2410 |
Edit: issue #2410 |
I found the Qt 6.2 (LTS) docs. The swap behavior was already present. So I think the 2nd option above is better—I'll make a PR with that. There's a chance somehow pyside6 6.0 or 6.1 won't work, but it seems slim. |
Making a fresh env, python 3.9 or python 3.10, then installing pyside6
pip install pyside6
and vispy (0.11.0) works, but runninghttps://vispy.org/gallery/scene/turntable_box.html#sphx-glr-gallery-scene-turntable-box-py
fails with error:
(by comparison the same but with
pip install pyqt6
works fine.)The text was updated successfully, but these errors were encountered: