-
Notifications
You must be signed in to change notification settings - Fork 176
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
python2.7 problem #1687
Comments
sabnzbd still uses python 2.7 which is why it can't be removed. For mine, I've created a (2) file/s called
|
I am using the script nzbtomedia.py for processing all |
The same as I’ve done it with just nzbtomedia.sh instead. |
Hi, thanks for the solution, but somehow the new file won't be listed in the categories script selection. They are definitely located in the correct nzbToMedia app/script folder. Update: It seems to only list new .py files and no .sh files |
@LennyM8472 check the permissions on the new .sh file. I had to change them to get it to show within SAB Also mine shows at the bottom of the list |
Great worked, has to be set to 777 (all read write Privileges). Now I will test a download and if the script runs. Thanks |
in case someone has a Qnap setup with Qpython3 this is the code for the .sh files - in this case for nzbToMedia
|
done what you said and i get this as result after running script |
Assuming your Does the .sh file contain /~Volmue1/scripts/nzbToMedia/nzbToMedia.py or just /~Volmue1/scripts/nzbToMedia/ ? You need to call the py script from the sh script. |
This is exactly the path nzbToMedia is placed in,i get this error after starting the script: This is how the nzbToMedia.sh file looks like: |
There must be a really simpler error in your script. |
@ikkeenjij36 as @LennyM8472 mentions, there must be a typo with your file location somewhere. In SABNzbd, go to Settings -> Folders and find 'Scripts Folder'. Use that location plus |
2 comments on the above;
The content is: From CLI it runs fine, but SabNZBD forces it to run under Python2.7, inline with what Clinton Hall mentions in #1533 (comment). However, from your comment I get the impression that you managed to overcome this. How did you do that? -- Running this from a Synology btw. |
EDIT; Apparently, pressing 'retry' within Sab also retries the exact same older command, including the older script. I'm testing it now with a new api call from Medusa. Let's consider this fixed with the .sh file :) If not, I'll post back with the results. Thanks :) |
yes, that's what I was going to say next. You have to do a complete new download, as the new download will only have the new script file attached to it |
I don't like the idea of making nzbToMedia scripts fail if python version installed on the client is not supported anymore. It is not like python will stop working after the end of the support. Plus, considering the slow integration cycle of distros like Debian, this behaviour will cause issues in the future. Next deadline in 256 days with v3.5, which is not available in the repos yet. |
I got the script running without errors only now it just keeps running with rinnun nzbToMedia.sh and there is no sight of returning with no errors? |
@ikkeenjij36, I just ran into your issue (nice: can't execute '/volume1/downloads/SCRIPTS/nzbToSickBeard.sh': No such file or directory). I noticed the permissions on the file we're wrong, but no matter what I did, it wouldn't resolve;
So, this is how I fixed it (not knowing any better);
This time, the file permissions looked like this (error2): For me, this issue has been resolved. Thanks all, hope the above will help others! |
For me still probs with the script
-- Cleaning bytecode -- -- Cleaning folders: ['core', 'libs'] -- Returning to directory: /volume1/@appstore/sabnzbd/share/SABnzbd -- Cleanup finished -- Changing to directory: /volume1/scripts/nzbToMedia -- Cleaning bytecode -- -- Cleaning folders: ['core', 'libs'] -- Returning to directory: /volume1/@appstore/sabnzbd/share/SABnzbd -- Cleanup finished -- NzbDrone: Failed to post-process - Returned log from NzbDrone was not as expected.!` |
It's not like python 2.7 will stop working, it's just no longer maintained. Don't bother messing around, simply edit the change and |
Thank you. This is exactly what I needed. |
The best post of the year so far :D !!! |
See also sabnzbd/sabnzbd#1203 for the status of the Py3 migration |
this guide somewhat helps: https://opensource.com/article/19/5/python-3-default-mac just run and if using hydra via wrapper just use launchd to run it with python2 enviroment variable set. |
Linuxserver.io's docker container for NZBGet still doesn't include python3. I believe there is a pull request pending that will add it to the image but as of now, I have had to edit eol.py to increase the grace period as the user above pointed out. |
Thanks for your tempory solution,now all works almost fine this resolved the pyhtom problem Now a small other thing maybe someone can help me too with this one `2020-01-01 22:32:57 DEBUG ::MAIN: InitialSchema upgrade not required
|
@ikkeenjij36 this happens when you have manually overwritten the files & git wont update nzbtomedia. you need to either commit them or stash them the files you edited. but just delete the files you manualy edited then run Or just disable |
alternativly you can just change the date listed in the eol.py to be something else (like 2030 instead of 2020) if the 100 day grace period isnt enough |
sorry all for the drama.... looks like I took the wrong week to disappear into the bush without internet access... I have removed the python2.7 eol failure and just set this to log and remind you to update. I'll try and keep support for python2 for now, but note that I may not make all new features compatible with python2.... |
I appreciate it, but honestly it’s more the problem of the containers (nzbget and sab) not having python3 available, which would have allowed a fair workaround with using a shell script to call out to nzbtomedia.
Keeping it dual stacked will inevitably become harder and harder to maintain.
|
thanks @skarekrow There are clearly a lot of divided opinions on this issue... I suspect this is only 1 of many apps that will cause some debate around continued, or not, support for python2. SABnzbd are working on a python3 version, NZBget has a shell override option which allows you for force the binary to call scripts, and I had made some simple .sh scripts available to "pass-through" to any python binary. Yes, some containers/apps do make it hard, but having built some Apps for NAS before I know it is pretty easy to only link the needed binaries into the PATH (i.e. when you have a python3.6 binary, python3 suymlinks to that, and python symlinks to python3, all inside some repository location it becomes easier just to symlink 1 'python' into the System Path). I'm not saying it is the "right" thing, but years down the track when Apps are all built on top of each other, some of these NAS systems ans busybox etc can become very temperamental when trying to figure out which command to call.... from what I have seen |
For those having this issue with linuxserver/nzbget you can modify the scripts shell settings via these instructions, which for me addressed the issue and now the nzbToMedia script runs successfully (without altering eol.py) |
That will work but will also force any other python extension scripts to use Python 3. If those other scripts are not Python 3 compatible, that will cause issues. I have to check VideoSort.py--that is the only other python extension script I use, and I'm not sure if it has been made Python 3 compliant. |
where did you get VideoSort.py from? I recall working on/contributing to this project back in the day, but can't recall where it ended up being hosted |
I believe I'm using this repo: https://github.com/nzbget/VideoSort |
yes, just found it... Hugbug has added a lot to this from the early discussions I recalled... I'll see if I do find time to have a play and possibly submit a PR for python3 support.... |
ok... I have updated a few things and got all of the imports to load etc.... https://github.com/clinton-hall/VideoSort Feel free to give this a test and see if it functions... I'll share it with hugbug to see if he wants to merge.... but I'm not in a position to test it all. |
For me its solved with the work arounds and finally after updating so i will close it for now |
Describe the bug
A clear and concise description of what the bug is.
Technical Specs
Expected behavior
A clear and concise description of what you expected to happen.
Log
Please provide an extract, or full debug log that indicates the issue.
Hi all as of 2020 python.27 is niot supported anymore,wen i want to remove 2.7 from my syno box it says all programs shoulod be deleted to remove 2.7
i also got python 3 installed
is there anyway to update with not to much hassle on my syno box?
this is what i get after running the script
Please use a newer version of Python. Python End-of-Life for current versions: v2.7 in 0 days v3.5 in 256 days v3.6 in 722 days v3.7 in 1273 days Python 2.7 is no longer supported.
using ds3617
with sabnzbd radar sonar headphones
The text was updated successfully, but these errors were encountered: