Skip to content
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

Crashes on launch: AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute 'QtGui' (most likely due to a circular import) #653

Closed
reboot-mk opened this issue Jan 1, 2024 · 3 comments

Comments

@reboot-mk
Copy link

Describe the bug

% syncplay --no-gui -a syncplay.pl:8996 -n lise -r test --player-path /usr/bin/mpv
Traceback (most recent call last):
  File "/usr/bin/syncplay", line 16, in <module>
    from syncplay import ep_client
  File "/usr/lib/syncplay/syncplay/ep_client.py", line 3, in <module>
    from syncplay.clientManager import SyncplayClientManager
  File "/usr/lib/syncplay/syncplay/clientManager.py", line 2, in <module>
    from syncplay import ui
  File "/usr/lib/syncplay/syncplay/ui/__init__.py", line 11, in <module>
    from syncplay.ui.gui import MainWindow as GraphicalUI
  File "/usr/lib/syncplay/syncplay/ui/gui.py", line 21, in <module>
    from syncplay.vendor import Qt
  File "/usr/lib/syncplay/syncplay/vendor/Qt.py", line 2029, in <module>
    _install()
  File "/usr/lib/syncplay/syncplay/vendor/Qt.py", line 2007, in _install
    our_submodule = getattr(Qt, name)
                    ^^^^^^^^^^^^^^^^^
AttributeError: partially initialized module 'syncplay.vendor.Qt' has no attribute 'QtGui' (most likely due to a circular import)

To Reproduce
Steps to reproduce the behavior:

  1. Start syncplay.

Expected behavior
Syncplay starts normally.

Version and platform:

  • OS: Arch Linux 6.6.8-zen1-1-zen
  • Syncplay version and build type: 1.7.1-2
  • Media player and version: v0.37.0

Additional context
I'm a bit puzzled as to why I'm getting this error even when I'm not using the GUI... It even pops up when using -v or -h.

@Et0h
Copy link
Contributor

Et0h commented Jan 1, 2024

I'm on Windows and have PySide installed so it's a bit hard for me to investigate, but I'll do my best to help figure it out...

On line 12 of /syncplay/ui/__init__.py try changing except ImportError: to except (ImportError, AttributeError) as e:
and let me know if that resolves the issue.

@reboot-mk
Copy link
Author

This worked, thank you!!

@Et0h
Copy link
Contributor

Et0h commented Jan 1, 2024

Glad it worked. I plan to make those change to the main Syncplay repo to fix the issue for others as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants