Open YamiDoesDev opened 1 year ago
I've not tested it, but https://github.com/Syncplay/syncplay/commit/b62b038cdf58c54205987dfc52ebf228505ad03b should hopefully solve the issue.
Well, that's literally what I did 😇 So consider it tested
I ran into this same issue today, using Manjaro 22.1.0. I had not used Syncplay since the previous Saturday.
Installing syncplay-git
from the AUR gave me the b62b038 commit, and was able to use Syncplay for 1.5 hours without any issue.
So, a +1 to it being tested.
I think on my Gentoo system, after updating from python 3.10 to python 3.11 I got a similar error:
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
Traceback (most recent call last):
File "/home/syncplay-dev/syncplay/syncplayClient.py", line 17, in <module>
ep_client.main()
File "/home/syncplay-dev/syncplay/syncplay/ep_client.py", line 8, in main
SyncplayClientManager().run()
File "/home/syncplay-dev/syncplay/syncplay/clientManager.py", line 9, in run
config = ConfigurationGetter().getConfiguration()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/syncplay-dev/syncplay/syncplay/ui/ConfigurationGetter.py", line 553, in getConfiguration
self._forceGuiPrompt()
File "/home/syncplay-dev/syncplay/syncplay/ui/ConfigurationGetter.py", line 455, in _forceGuiPrompt
for key, value in list(self._promptForMissingArguments().items()):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/syncplay-dev/syncplay/syncplay/ui/ConfigurationGetter.py", line 420, in _promptForMissingArguments
gc.run()
File "/home/syncplay-dev/syncplay/syncplay/ui/GuiConfiguration.py", line 42, in run
dialog = ConfigDialog(self.config, self._availablePlayerPaths, self.error, self.defaultConfig)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/syncplay-dev/syncplay/syncplay/ui/GuiConfiguration.py", line 1430, in __init__
self.setWindowFlags(self.windowFlags() & Qt.WindowCloseButtonHint & ~Qt.WindowContextHelpButtonHint)
TypeError: 'PySide2.QtCore.Qt.WindowFlags' object cannot be interpreted as an integer
Everything was working fine before that. I think after reinstalling the requirements it might've pulled a new version of PySide as well. Right now it's running PySide2-5.15.2.
Everything was working fine before that. I think after reinstalling the requirements it might've pulled a new version of PySide as well. Right now it's running PySide2-5.13.2.
If you change the line:
https://github.com/Syncplay/syncplay/blob/af0d0006f143353f7ef096390883a8070cf0aca4/syncplay/ui/GuiConfiguration.py#L1430 to read self.setWindowFlags(self.windowFlags() & Qt.WindowType.WindowCloseButtonHint & ~Qt.WindowType.WindowContextHelpButtonHint)
does it fix things?
You may also have to change the line:
https://github.com/Syncplay/syncplay/blob/b62b038cdf58c54205987dfc52ebf228505ad03b/syncplay/ui/gui.py#L142 to self.setWindowFlags(Qt.WindowType.Dialog | Qt.WindowType.WindowTitleHint | Qt.WindowType.WindowCloseButtonHint | Qt.WindowType.CustomizeWindowHint)
If that doesn't work, does commenting out these line result in Syncplay and the configuration window working adequately?
to read self.setWindowFlags(self.windowFlags() & Qt.WindowType.WindowCloseButtonHint & ~Qt.WindowType.WindowContextHelpButtonHint) does it fix things?
Nope, the same error appears.
Don't bother, because I just noticed this in the PySide2 package page:
Requires: Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.11
Source: https://pypi.org/project/PySide2/
@YamiDoesDev What Python version is your system running? Your issue might be related to this.
Edit: Yep, just tested, changing to python3.10 fixed my issue. My exact current working Python version is: 3.10.10
Edit2: In my case with or without the commit https://github.com/Syncplay/syncplay/commit/b62b038cdf58c54205987dfc52ebf228505ad03b it works fine as long as I'm using Python 3.10.
@powerjungle Currently I run python 3.10.10, but it could have been a lower version a month ago.
Did this bug really become that big? Like, commenting out that one parameter already fixed it for me back then...
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior Syncplay would open the room and possibly a video as well.
Screenshots If applicable, add screenshots to help explain your problem.
Version and platform:
Additional context
The path: Syncplay/syncplay/blob/master/syncplay/ui/gui.py#L2109)
I don't have much of an understanding about qt-python myself. On one hand, it seems no not like the
&
operator. Changing it to|
did not help either. If I change the operator into a comma, following error will be printed instead:A possible workaround for me was to just comment out the second parameter. At least it loaded the room as intented.