Page 2 of 2
Re: Problem running a python script for postproc
Posted: January 9th, 2010, 1:31 pm
by rudyb
Cool, thanks!
Re: Problem running a python script for postproc
Posted: July 8th, 2012, 5:01 pm
by Alives
I am getting this error now as well. Python has been installed via cygwin, and is in the system path.
Code: Select all
'python' is not recognized as an internal or external command,
operable program or batch file.
SABnzbd Version: 0.7.0 running on Windows 7
Re: Problem running a python script for postproc
Posted: July 9th, 2012, 1:43 am
by shypike
You did not tell Windows that the .py extension is associated with Python.
Check the PATHEXT environment variable, it should contain ".PY".
Then the
assoc and
ftype commands.
They should show things like this:
Code: Select all
D:\> ftype Python.File
Python.File="C:\bin\Python27\python.exe" "%1" %*
D:\> assoc .py
.py=Python.File
Re: Problem running a python script for postproc
Posted: July 16th, 2012, 8:59 am
by lalalnx
My python post processing script worked before 0.7.0, now I'm on 0.7.1 but I get this error with both 0.7.0 and 0.7.1:
'python' is not recognized as an internal or external command, operable program or batch file.
SABnzbd Category Setting: Script: sabToSickBeard.py
PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Python27
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY
C:\Users\Administrator>ftype Python.File - Python.File="C:\Python27\python.exe" "%1" %*
C:\Users\Administrator>assoc .py - .py=Python.File
C:\Users\Administrator>python
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
I can also confirm that python is indeed located in C:\Python27\python.exe
Any ideas?
Re: Problem running a python script for postproc
Posted: July 16th, 2012, 10:44 am
by shypike
Are these paths actually available for SABnzbd?
There are system-level paths and user-level paths.
The fact that both 0.7.0 and 0.7.1 "stopped working" for this and
going back to 0.7.0 doesn't solve it, indicates a cause outside SABnzbd.
Anyway, there's a simple workaround. Use a wrapper script.
Code: Select all
@echo off
c:\python27\python.exe \path\to\script.py %1 %2 %3 %4 %5 %6 %7 %8 %9