Playonlinux aborts at start Reproducible: Always Steps to Reproduce: 1. Run playonlinux Actual Results: Output: $ playonlinux Looking for python3... 3.14.0 - selected /usr/share/playonlinux/python/mainwindow.py:710: SyntaxWarning: "\|" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\|"? A raw string is also an option. \|XPM (*.xpm)|*.xpm;*.XPM\ 1.0 Traceback (most recent call last): File "/usr/share/playonlinux/python/mainwindow.py", line 45, in <module> from setupwindow import gui_server File "/usr/share/playonlinux/python/setupwindow/gui_server.py", line 27, in <module> from .POL_SetupFrame import POL_SetupFrame File "/usr/share/playonlinux/python/setupwindow/POL_SetupFrame.py", line 36, in <module> urllib.request.URLopener.version = Variables.userAgent # Arg ... ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'urllib.request' has no attribute 'URLopener' Additional Information: Commenting out this line: urllib.request.URLopener.version = Variables.userAgent # Arg ... in /usr/share/playonlinux/python/setupwindow/POL_SetupFrame.py allows playonlinux to start. I'm not sure of the further implications.
This is an old API that has been removed since Python 3.10. The problem can be corrected by replacing line 36 of the file `/usr/share/playonlinux/python/setupwindow/POL_SetupFrame.py`: ``` urllib.request.URLopener.version = Variables.userAgent ``` with: ``` opener = urllib.request.build_opener() opener.addheaders = [('User-Agent', Variables.userAgent)] urllib.request._urlopener = opener ``` I think these modifications should be added to the patch applied to the RPM sources.
FYI the fix gently provided by Cyril up here, works for me.