-
Notifications
You must be signed in to change notification settings - Fork 43
Update to Python 3? #61
Comments
I'm seeing a similar error, just the line number being different (851 in my case) |
Also got syntax error on line 851. |
VideoSort requires Python 2. The script description clearly states that. |
Yes, it does, but Python2 was EOLed in january. (Which you probably knew) Personally I rolled back the docker container I was using to an older version, and have got the script running again, but it would be really nice to get the script ported to Python3. I'm not a Python dev, so I don't think I can be of much help, unfortunately .. But just for fun, is there an easy way to run the script standalone with the testdata in the repo? |
Yes, just run |
linuxserver.io provided a workaround to use customized script inside the container: https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ For the time being, a temporary fix is to log into the NZBGet container terminal, and run script below.
And then restart the container. |
My fork has Python 3 support. As the most recent commit implies, it's not pretty. I just wanted to get something working for personal use. The tests haven't been updated and it probably doesn't run on Python 2 but if anyone wants to use it as a starting point for a real port/PR then feel free. |
I started to work on porting this to python 3 too, and managed to get to a reasonable state using shiv to produce a |
Ive also managed to install an older version of BZBGet that gets thigns working agian but guess going forwarded there will need to be an update of some sort to videosort |
Just out of curiosity: you have not planned to port the script to a more recent Python version yourself? Is the project abandoned? |
I've made some changes for python 3 compatibility. In my limited tests it worked fine with both python 3 and 2. All built-in tests pass. Please try this version from branch python3. |
Thanks @hugbug. When I try to just run the python3 branch (from a git checkout) I get these errors. This is via the linuxserver docker image, but I also see the same errors just trying to run
I didn't see an obvious way to create a release bundle / zip file from the git repo, is there anything I should be doing besides just checking it out in my |
Following up, I'm guessing you may want to upgrade the |
I've made the changes on an older Mac with Python 3.3 where it worked.
The tests fail because you updated guessit. VideoSort doesn't work properly most likely. It seems something important has changed in guessit and requires changes in VideoSort. |
I've made some changes. Please try the newer version. Thanks. |
@hugbug: thanks for the fast update. I tried the latest commits and everything seems to work great for me (running in the latest One oddity was that when I first ran it I got an error about not being able to find |
Probably you installed this version of VideoSort into a new directory and there were no settings saved in nzbget for this new script. Thanks for testing, I'll merge this into master branch. |
Merged into master. Please use the version from master-branch. It turned out the python3-branch had a few last commits missing. |
@hugbug Awesome. Thanks for taking the time to look into this. |
Thank you for making the changes in 79604c9. Should we create a new GitHub release to indicate the version increment? |
@hugbug is it possible to create a new release? For now, I use your master branch with homebrew Python 3.8 on my Mac: $ brew install python
$ pip3 --no-cache-dir install guessit
$ pip3 show guessit
Name: guessit
Version: 3.1.1
Summary: GuessIt - a library for guessing information from video filenames.
Home-page: http://guessit.readthedocs.org/
Author: Rémi Alvergnat
Author-email: [email protected]
License: LGPLv3
Location: /usr/local/lib/python3.8/site-packages
Requires: python-dateutil, rebulk, six, babelfish
$ git clone [email protected]:nzbget/VideoSort.git \
~/Library/Application\ Support/NZBGet/scripts/VideoSort I noticed this warning:
|
Are there any specific version requirements for this script with Python 2? I have the script working perfectly on a machine at home, but I can't get it to work on my seedbox. I'm getting the same exact error as in the first post of this issue, but I'm not using Python 3. I've been over the setup with my seedbox's support, and they are kind of stumped. The only difference we determined is that my home system has Python 2.7.16, but the seedbox has 2.7.13. Could this be causing a problem? We've checked all dependencies (guessit, etc) and everything else is installed correctly. The only difference is the Python version. |
@BEisem This topic is about Python 3 support. |
👍 for a new release with py3 support |
I didn't see a release so I just copied your master branch. It seems to work mostly in a fresh freebsd jail with py3, however during the renaming process there is this error:
Besides the main file that was extracted, this file was also present and I believe the culprit for this code running: I'm not a python dev so I'm not entirely sure where to start on this one. Let me know if I can provide more information. Great work updating to py3 so far, very appreciated 👍 Other than this error, it appeared that it had moved the file and renamed it properly, it just failed to cleanup. |
Needed this fixed sooner rather than later, so I dug into the code a bit, but it's been 25 years since I've done any python, so 🤷 ... Also, there appeared to be an issue with the particular comparison of the base and fbase names. That code hasn't changed in years, so I don't know that I understand why it works now that I've inverted that expression - perhaps I don't understand it - it looks to me like it will never move the satellite files if they don't match the base name already. I submitted a PR you could refer to here |
Using Ubuntu 20.04, nzbget 21.0, python3 and python3-guessit. VideoSort fails with the syntax error below:
|
Any chance to get a new release, as the last one was 2018, but python3 support was added 10months ago. Thanks for the work done. |
Hi, On my Qnap TS-431p nas i have Python 3.10 running (cannot downgrade it) and not sure if this is the issue but videosort does not work correctly. I get following error on post process: VideoSort: Traceback (most recent call last): I'm guessing python 3.10 fucked something up (but as mentioned i cannot downgrade). Would appreciate if someone could take a look what would fix this issue. Thanks! |
Hi, @Freakadude: while waiting for the next release from the real devs (I'm just some random schmo), you can fix this locally by changing:
to
If you're curious, |
@mikenerone Thx for the suggestion! |
I am using Linuxserver.ios docker image for NZBGet, and they recently dropped support for Python2 (completely removed it), and running the VideoSort plugin on Python3 gives the following error
The text was updated successfully, but these errors were encountered: