Closed Mikaela closed 1 week ago
Tested recently with Python 3.11.
Sadly, GUI does not work there, because PySide2 is not ported to Python3.11 yet (https://pypi.org/project/PySide2/):
Requires: Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.11
Dependencies are installed properly for both no-gui and gui requirements but it fails to launch in GUI. I get the following errors trying it:
(.venv) echedey@echedey-devuan-pc:~/Applications/syncplay-1.7.0$ python syncplayClient.py
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
Traceback (most recent call last):
File "/home/echedey/Applications/syncplay-1.7.0/syncplayClient.py", line 17, in <module>
ep_client.main()
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ep_client.py", line 8, in main
SyncplayClientManager().run()
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/clientManager.py", line 9, in run
config = ConfigurationGetter().getConfiguration()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ui/ConfigurationGetter.py", line 553, in getConfiguration
self._forceGuiPrompt()
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ui/ConfigurationGetter.py", line 455, in _forceGuiPrompt
for key, value in list(self._promptForMissingArguments().items()):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ui/ConfigurationGetter.py", line 420, in _promptForMissingArguments
gc.run()
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ui/GuiConfiguration.py", line 42, in run
dialog = ConfigDialog(self.config, self._availablePlayerPaths, self.error, self.defaultConfig)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/echedey/Applications/syncplay-1.7.0/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
No GUI mode, works:
.venv) echedey@echedey-devuan-pc:~/Applications/syncplay-1.7.0$ python syncplayClient.py --no-gui
[14:04:52] Attempting to connect to [REDACTED]
ERROR: Could not find media directory '/media/sdb1/Multimedia/Series/She-Ra and the Princesses of the Power (2018)/Season 1'. To update your list of media directories please select File->Set Media Directories from the menu bar and specify where Syncplay should look to find media files.
[14:04:55] Attempting secure connection
[14:04:55] Successfully reached [REDACTED] ([REDACTED])
[14:04:55] Secure connection established (TLSv1.3)
[14:04:55] Successfully connected to server
In room '[REDACTED]':
*<Echedey>* is not playing a file
MPV is launched and everything.
Tested recently with Python 3.11.
Sadly, GUI does not work there, because PySide2 is not ported to Python3.11 yet (https://pypi.org/project/PySide2/):
You can try with PySide6. We recently updated our vendor copy of Qt.py to support it and we already use it as binding on macOS.
I guess the requirements_gui.txt will have to be modified.
I will test in a while. Just that won't work with stable 1.7.0 since it is referencing PySide2.
Okay, tested.
It starts with PySide6.
Just had to edit requirements_gui.txt file, remove the first line referencing PySide2 and then remove the darwin marker for PySide6 and proceed to install them.
I tested the main GUI only as the room GUI returns the following error:
(venv) echedey@echedey-devuan-pc:~/Applications/syncplay-1.7.0$ ./syncplayClient.py
Traceback (most recent call last):
File "/home/echedey/Applications/syncplay-1.7.0/./syncplayClient.py", line 17, in <module>
ep_client.main()
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ep_client.py", line 8, in main
SyncplayClientManager().run()
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/clientManager.py", line 12, in run
interface = ui.getUi(graphical=not config["noGui"], passedBar=menuBar)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ui/__init__.py", line 17, in getUi
ui = GraphicalUI(passedBar=passedBar)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/echedey/Applications/syncplay-1.7.0/syncplay/ui/gui.py", line 2109, in __init__
self.setWindowFlags(self.windowFlags() & Qt.AA_DontUseNativeMenuBar)
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for &: 'WindowType' and 'ApplicationAttribute'
This is after I press any of the buttons related to either run Syncplay or store config and run Syncplay.
I also tested to restore the defaults and try again in one of the main servers with the same error.
@EchedeyLR Does changing the &
operator to a |
operator fix the operand error(s)?
Invalid too.
Maybe this operator was deprecated and end removed in this version?
Okay, these operators are called bitwise operators
.
I will check for some change in Python 3.11.
Well, the documentation says that both arguments must be either integers or one of them must be a custom object overriding __and__()
or __rand__()
.
I guess it is a point to start.
https://github.com/Syncplay/syncplay/pull/636 updates to 3.12
@kilmanio how is about GUI?
The issue is another way deep inside after this first issue.
@EchedeyLR runs fine for me
@kilmanio yes but on master or the stable release?
And with Python 3.11 and ensuring everything was changed to PySide6.
@EchedeyLR
I forked master
.
Python 3.12
pyside2-5.15
I don't have pyside6 installed
PySide6 is needed for the GUI as it is supposed that PySide2 does not support the rest. I mean the Qt GUI.
I don't know what you want me to tell you; I am running syncplay with the gui, the only version of pyside I have is PySide2-5.15. I fixed the original issue, I have no problems with the gui.
But PySide2 is not supposed to be ported yet to Python 3.12 and it does not work with 3.11.
I think I will have to test master version or so to check again.
If you could read properly the history of this very same thread you would understand what I mean.
What I want to understand is why is working for you and not for me in a complete clean environment.
That is why I asked the info initially. I guess that if 3.12 works for you, 3.11 should work too, at least on master even if the other issue (GUI) was there as it was fixed somehow in master making it working for you.
For the avoidance of doubt, my understanding is that the master @kilmanio is referring is their own master, i.e. https://github.com/kilmanio/syncplay which is the basis of the pull request at https://github.com/Syncplay/syncplay/pull/636 - you can get this version in tarball form at https://github.com/kilmanio/syncplay/archive/refs/heads/master.tar.gz
I can't speak for Python 3.11/12 as I've not used them yet, but having worked on compatibility issues in the past I can say that it does seem plausible on the face of it for something complicated to work with 3.12 but not with 3.11 as there might have been some sort of change that caused problems and was reverted, or a compatibility feature added.
FWIW PySide2 is retired in Fedora 39 and Fedora 40: https://bugzilla.redhat.com/show_bug.cgi?id=2220452
Unfortunately, PySide6 is also not packaged for Fedora.
EDIT: Fortunately PyPI has an aarch64 build of PySide6: https://pypi.org/project/PySide6/#files
This leaves Fedora Asahi Remix users in limbo as there's no aarch64 build for the AppImage: https://github.com/Syncplay/syncplay/issues/368#issuecomment-1503008313
Is this issue resolved by https://github.com/Syncplay/syncplay/commit/fc0d2c5268a74fa4e195a6058488f13410678f42 (included in Synclay 1.7.1 stable)?
Seems to build fine for me without overriding anything.
Describe the bug
I am on Fedora 39 beta which ships with Python 3.12 and unable to
./syncplayClient.py
.To Reproduce Steps to reproduce the behavior:
git clone ...
mkdir venv
python3 -m venv venv
. venv/bin/activate
python3 -m pip install requirements.txt
./syncplayClient.py
Expected behavior
Syncplay won't traceback
Screenshots
N/A
Version and platform:
Additional context
if I attempt to run
./syncplayClient.py
without venv, I get more errors:If I use
python3.10
orpython3.11
, it will work, same withpypy3
which is 3.10.2.I haven't tried 3.11 which didn't work on another project (https://github.com/editorconfig-checker/editorconfig-checker.python/issues/28).