Python-scripts on Synology

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
sbeek
Posts: 9
Joined: 30 Jun 2013, 17:11

Python-scripts on Synology

Post by sbeek » 02 Jul 2013, 09:08

Hi,

When using this script on NZBget v11 i get the message:

Post-process-script nzbToMedia/nzbToMedia.py for ....... failed (terminated with unknown status)
nzbToMedia: env: python: No such file or directory

Any idea what could be wrong?

Im running this on a bootstrapped Synology 1513 with the SynoCommunity python package installed.

hugbug
Developer & Admin
Posts: 7386
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 02 Jul 2013, 09:15

Python is not in the PATH.
Before starting NZBGet do:

Code: Select all

PATH="$PATH:/usr/local/python"
The NZBGet package from synocommunity should do this automatically.

sbeek
Posts: 9
Joined: 30 Jun 2013, 17:11

Re: nzbToMedia for NZBGet V11+

Post by sbeek » 02 Jul 2013, 09:36

Hi Hugbug,

The synocommunity does not have the version 11 available yet, and previously i installed it manually with ipkg.

I have added the line :/usr/local/python to /root/.profile and rebooted the NAS but this does not seem to work either.
As i know the way to get around with linux CLI im by far a expert.
Could you please explain where I add this line in order to get this to work?

Thanks in advance!

hugbug
Developer & Admin
Posts: 7386
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 02 Jul 2013, 09:46

How do you start NZBGet - manually from terminal after each reboot or automatically from some script file? In the latest case add the PATH-changing to this script file.

The /root/.profile is executed when yoo log-in as root to the teminal. If NZBGet is started from a boot script the /root/.profile is not executed.

sbeek
Posts: 9
Joined: 30 Jun 2013, 17:11

Re: nzbToMedia for NZBGet V11+

Post by sbeek » 02 Jul 2013, 10:00

Hi Hugbug,

I have nzbget started up with a file /opt/etc/init.d/S99nzbget.sh
I added the path to this file but still the same error sadly :(

Also stopped nzbget and executed the path through CLI and then started nzbget -D manually but the same result happens

hugbug
Developer & Admin
Posts: 7386
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 02 Jul 2013, 10:04

Try to execute Logger.py from terminal and post here the error message.

sbeek
Posts: 9
Joined: 30 Jun 2013, 17:11

Re: nzbToMedia for NZBGet V11+

Post by sbeek » 02 Jul 2013, 10:07

env: python: No such file or directory

when executing echo $PATH it gives me:

/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/usr/local/python

hugbug
Developer & Admin
Posts: 7386
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 02 Jul 2013, 10:12

Try to execute "/usr/local/python" and "env" to test if you have these both programs.

hugbug
Developer & Admin
Posts: 7386
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 02 Jul 2013, 10:13

Not "env" but "/usr/bin/env".

hugbug
Developer & Admin
Posts: 7386
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 02 Jul 2013, 10:19

The path /usr/local/python is probably not correct. Try "/usr/local/python/bin" instead.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests