NzbToMedia -> Python3
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
-
- Newbie
- Posts: 6
- Joined: December 29th, 2019, 7:42 am
NzbToMedia -> Python3
Happy new year
Starting today, Python 2.7 is no longer officially supported. NzbToMedia postprocessing fails to run, if not using Python 3.
I tried to call the script via .sh to use Python3, but it seems that Sab forces Python 2.7 nonetheless.
What are our options? Is there a way to force Sab to run those scripts under Python 3+? I understand Sab is not (yet) supporting Python3. Or should we go at it differently?
Many thanks for your hard work Saph!
Starting today, Python 2.7 is no longer officially supported. NzbToMedia postprocessing fails to run, if not using Python 3.
I tried to call the script via .sh to use Python3, but it seems that Sab forces Python 2.7 nonetheless.
What are our options? Is there a way to force Sab to run those scripts under Python 3+? I understand Sab is not (yet) supporting Python3. Or should we go at it differently?
Many thanks for your hard work Saph!
Re: NzbToMedia -> Python3
Struggling with the same problem.
As a new user i am not allowed to post links, but also see issue 1533 at github from Clinton Hall's nzbToMedia scripts.
thx
EDIT by sander: https://github.com/clinton-hall/nzbToMedia/issues/1533
As a new user i am not allowed to post links, but also see issue 1533 at github from Clinton Hall's nzbToMedia scripts.
thx
EDIT by sander: https://github.com/clinton-hall/nzbToMedia/issues/1533
-
- Newbie
- Posts: 6
- Joined: December 29th, 2019, 7:42 am
Re: NzbToMedia -> Python3
To add / clarify;
The workaround is proposed as to create a .sh file, and let SabNZBD run that as the script.
The contents would be:
#!/bin/bash
python3 /volume1/downloads/SCRIPTS/nzbToSickBeard.py "$@"
Now, from the CLI, this works. From SabNZBD however, we still get "Python 2.7 is no longer supported.", which means SabNZBD tries to run the file under Python2.7 still. Clinton Hall suggested that he had seen in the past that SabNZBD forces .py files to run under the same version of Python as SabNZBD runs under, hence my question: Can we overrule this behavior?
Thanks!
EDIT: I think my error was that I was pressing 'retry' on previous failed items, which seem to call the old script as well. I am testing now with a new API call from medusa to see if it works now. Let's consider this fixed with the .sh file, and if not, i'll post back thanks!
The workaround is proposed as to create a .sh file, and let SabNZBD run that as the script.
The contents would be:
#!/bin/bash
python3 /volume1/downloads/SCRIPTS/nzbToSickBeard.py "$@"
Now, from the CLI, this works. From SabNZBD however, we still get "Python 2.7 is no longer supported.", which means SabNZBD tries to run the file under Python2.7 still. Clinton Hall suggested that he had seen in the past that SabNZBD forces .py files to run under the same version of Python as SabNZBD runs under, hence my question: Can we overrule this behavior?
Thanks!
EDIT: I think my error was that I was pressing 'retry' on previous failed items, which seem to call the old script as well. I am testing now with a new API call from medusa to see if it works now. Let's consider this fixed with the .sh file, and if not, i'll post back thanks!
Re: NzbToMedia -> Python3
If true, that is interesting (and annoying).PeterPan669 wrote: ↑January 1st, 2020, 7:59 am I tried to call the script via .sh to use Python3, but it seems that Sab forces Python 2.7 nonetheless.
EDIT: I verified with SABnzbd 2.3.9 (thus running python2), and let SAB run a python3 post-processing script, and that worked perfectly: python3. So I cannot confirm your statement.
More
On Linux, the current python3 version of SABnzbd is quite usable; I've been using it for months now for my downloads.
So ... do you want to use that?
-
- Newbie
- Posts: 6
- Joined: December 29th, 2019, 7:42 am
Re: NzbToMedia -> Python3
Hello Sander,
Thank you for commenting
I wasn't aware of a Python3 version of SabNZBD. I'm on Synology, so probably I didn't look for it in the right place.
At any rate, I managed to resolve the issue; It was my misunderstanding on how Sab works. Instead of testing with a 'fresh' API call from Medusa, I pressed "Retry" after altering the script. I didn't know that the old script would still be attached that way. With the new downloads, all is working great.
To recap; the solution for me was creating a new .sh file, that is called by Sab as a post processing. Inside the .sh file, I specified:
#!/bin/bash
python3 /volume1/downloads/SCRIPTS/nzbToSickBeard.py "$@"
I hope this helps others!
Thanks again for all you guys hard work!
Thank you for commenting
I wasn't aware of a Python3 version of SabNZBD. I'm on Synology, so probably I didn't look for it in the right place.
At any rate, I managed to resolve the issue; It was my misunderstanding on how Sab works. Instead of testing with a 'fresh' API call from Medusa, I pressed "Retry" after altering the script. I didn't know that the old script would still be attached that way. With the new downloads, all is working great.
To recap; the solution for me was creating a new .sh file, that is called by Sab as a post processing. Inside the .sh file, I specified:
#!/bin/bash
python3 /volume1/downloads/SCRIPTS/nzbToSickBeard.py "$@"
I hope this helps others!
Thanks again for all you guys hard work!
Re: NzbToMedia -> Python3
Ah, Synology ... no that is not a great platform to test-use python3-sabnzbd.
-
- Newbie
- Posts: 30
- Joined: July 17th, 2012, 6:00 pm
Re: NzbToMedia -> Python3
I also like to report same issue,and also got it resolved now by editing eol.py file for now
Just waiting for an update of the synology package of sabnzbd for use of python 3
Just waiting for an update of the synology package of sabnzbd for use of python 3
Re: NzbToMedia -> Python3
Clever decision.ikkeenjij36 wrote: ↑January 2nd, 2020, 1:09 pm I also like to report same issue,and also got it resolved now by editing eol.py file for now
BTW: On which OS is your SABnzbd running?
Re: NzbToMedia -> Python3
Peter, can you do this:
Of /volume1/downloads/SCRIPTS/nzbToSickBeard.py change the first line
to
(So: just add a 3 directly after python, without a space)
and start using the nzbToSickBeard.py directly again. Please report back the result.
Of /volume1/downloads/SCRIPTS/nzbToSickBeard.py change the first line
Code: Select all
#!/usr/bin/env python
Code: Select all
#!/usr/bin/env python3
and start using the nzbToSickBeard.py directly again. Please report back the result.
Re: NzbToMedia -> Python3
@sander, I did that a couple of days ago, and can verify it works fine.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
-
- Newbie
- Posts: 30
- Joined: July 17th, 2012, 6:00 pm
Re: NzbToMedia -> Python3
Running on synology dsm6.1sander wrote: ↑January 2nd, 2020, 2:30 pmClever decision.ikkeenjij36 wrote: ↑January 2nd, 2020, 1:09 pm I also like to report same issue,and also got it resolved now by editing eol.py file for now
BTW: On which OS is your SABnzbd running?
Re: NzbToMedia -> Python3
I did the same mod to a couple of other nzbToMedia post-processing Python files (called via SABnzbd). But not all nzbToMedia Python files.
Clinton Hall probably needs to update nzbToMedia to request 'python3' instead of 'python'.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Re: NzbToMedia -> Python3
I was getting Python 2.7 is no longer supported. I did the edit mentioned for nzbToSickBeardpy but now I am getting ModuleNotFoundError: No module named '_sqlite3'
Re: NzbToMedia -> Python3
The dev has changed to code so the script now only warns about the old python version, but continuos to work. I had to do a git pull to get this new version, but now everything works again the way it used to work.