Page 1 of 1

Python scripts not selectable on script ddl - windows

Posted: September 12th, 2011, 10:52 am
by rashire
System:
OS: win7 x64
Sab ver: 0.6.9 installed via msi
Skin: plush

Issue:
Since a few revisions ago I have been unable to select python post processing scripts (.py files) from the script drop down list. I can still see my .exe post processor, and my category I had previously set to use a python post processing script still run successfully. The configured script is still set in the .ini. However the script is not selectable on the script list on either the download page or the configuration page.

This is an issue because some times I manually start downloads for that category and need to set the post processing for it and have not been able to.

My assumption is a filter was added for python scripts on windows installs since these files used to appear on old revisions (5.x.x and maybe early 6.x).

My request is a fix to display python files in the drop down list, or a user configuration option to control file extension filtering.

Re: Python scripts not selectable on script ddl - windows

Posted: September 12th, 2011, 12:05 pm
by sander
You must put the .PY extension in your Windows' PATHEXT. Search this forum, and you will find more info.

HTH

Re: Python scripts not selectable on script ddl - windows

Posted: September 12th, 2011, 4:17 pm
by rashire
Hmm guess I should have searched more, however still having issues.

Found the thread: http://forums.sabnzbd.org/viewtopic.php?f=3&t=8434
Then used this site for reference: http://www.voidspace.org.uk/python/arti ... line.shtml
To edit my Path and Pathext vars.

Tested the variables:

Code: Select all

C:\>echo %path%
C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Python27;c:\Program Files (x86)\SABnzbd\scripts

C:\>echo %pathext%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW

*EDIT*
Ok, apparently it required a shutdown of sab and a fresh launch not a 'reset' for it to grab the new settings.

Working good for me now, hopefully this helps someone else.


Still no .py scripts after sab restart, Will try a complete restart when I get home.

Re: Python scripts not selectable on script ddl - windows

Posted: September 19th, 2011, 3:43 pm
by pmow
This info was added to the manual under Config>Folders.

Re: Python scripts not selectable on script ddl - windows

Posted: October 20th, 2011, 1:21 pm
by snapper
I have SABnzbd install under Linux (ReadyNAS) and I seem to be getting the same problem. I've just installed a bundle of SAVnzbd, Sickbeard and couch potato and I'm now configuring them.

I've set the scripts folder up in SABnzbd as /usr/share/sickbeard/autoProcessTV - yet the drop down in the Categories page shows nothing apart from default and none.

Can I hardcode this in the sabnzbd.conf file so I can get it working - if so how??

Re: Python scripts not selectable on script ddl - windows

Posted: October 20th, 2011, 1:59 pm
by shypike
Your PY files should have their X bit set.
chmod +x myscript.py
This is a general Unix requirement for any executable file.

Also make sure that the script starts with:
#!/usr/bin/python
Where "/usr/bin/python" should be the full path to the Python executable on your system.

Re: Python scripts not selectable on script ddl - windows

Posted: October 20th, 2011, 3:26 pm
by snapper
Ahh. Sorted now. Really should have known that. Apologies