-
Notifications
You must be signed in to change notification settings - Fork 156
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
Scanner does not work with python3 on linux #505
Comments
This change breaks all python2 installations. i.e. this has broke https://hub.docker.com/r/linuxserver/plex on version 1.41.3.9314 Please consider revert this PR. Also, how did you run this script with python3? Which python version did you use? I might missed it but when did Plex started supporting python3? Also, this script is full of py2 tricks, string syntax is not the only thing would break with py3. I'd be really surprised if you actually got this to work with a py3 installation. @ZeroQI may want to take a look |
@TransparentBeing Thanks for the report, this can be reverted if it has broken python2. Regarding python3, I am running plex on an Ubuntu 22.04 (jammy) system that does not have python2 installed. I can't speak to when or if plex added explicit support, but the script appears to work for my use case (all I want is for plex to extract episode name metadata from filenames and that's what I'm getting). To test python3 compatibility, I used the |
AFAIK plex bundles it's own python (or at least for some server installations), so it may not matter if you have python2 installed via the package manager or not. It's highly likely you're running python2 under the hood unless you can find python3 specific error messages in logs. Please note this is just my speculation, as plex doesn't publish documentations. I suggest double checking logs in order to pin point why ASS did not work for you before this PR. As for how things is not broken for you after this PR, removing I took a quick look at the script, it is just very far from compatible with python3. Just a few examples things WILL break with py3:
Provided plex has been attempting to deprecate plugins support (like in this announcement for shield), I think it may not worth the effort migrating to python3 until the future of plugins support is clear. |
The latest ASS does not work correctly on python3.
Platform
Operating system and version: Ubuntu 22.04 (jammy)
Plex version: 1.41.3.9314-a0bfb8370
Expected Behavior
After installing in the correct directory with the correct permissions, I should be able to select ASS as the scanner and create a new library.
Current Behavior
After installing into the correct directory with the correct permissions, plex is unable to use ASS as a scanner. It appears in the list, but I see the error message
Your changes were not saved.
upon trying to save the library.Steps to Reproduce
/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Scanners/Series/Absolute\ Series\ Scanner.py
Additional information
The problem is that the current ASS does not compile with python3. This is easily verifiable:
To fix, replace regex strings starting with
ur'
withr'
. Theur
prefix is not allowed in python3 althoughu
andr
by themselves are ok. Once I did this in my local copy, ASS works as expected.The text was updated successfully, but these errors were encountered: