Page 1 of 1
No scripts options after update.
Posted: August 18th, 2012, 5:58 pm
by topdeck
After the most recent update to 0.7.3 sabnzbd no longer allows me to set a default script. The script folder is still set in the options, I've verified that.
When I go to the Categories menu there are no scripts in the dropdown:
Prior to the update everything was working perfectly. :/
Re: No scripts options after update.
Posted: August 19th, 2012, 1:34 am
by sander
Which OS? On Windows, I believe you need to set PATHEXT
And is the executable bit of the script set?
Re: No scripts options after update.
Posted: August 19th, 2012, 1:43 am
by topdeck
sander wrote:Which OS? On Windows, I believe you need to set PATHEXT
And is the executable bit of the script set?
This is Windows, and nothing has changed on my end other than installing the newest version of sabnzbd. Everything used to work perfectly. You can see in my screenshot the dropdown to choose a script is blank.
Setting PATHEXT was never needed before, you'd think they would mention something if there was a change. You'd also think the forums would be filled with windows users complaining about the same issue.
EDIT: I set PATHEXT to include both .PL and .pl and there was no change, even after restarting. I made a dummy .cmd file in the scripts folder and it appeared in the dropdown list. Can someone give me step by step instructions on how to fix this?
EDIT EDIT: I figured, if it can see .cmd files, why not make one that runs my perl script? Well, I tried it and it doesn't work either. The .cmd file is not run, even though it says it will run it nothing happens. I changed the .cmd file to do nothing but echo "DONE" to a logfile as a test and it failed. Just tried renaming the file .BAT and still no joy.
Re: No scripts options after update.
Posted: August 19th, 2012, 4:43 am
by shypike
This is the logic used to select scripts.
(Abbreviated and stripped from non-Windows support, but it shows the criteria used).
Code: Select all
PATHEXT = os.environ.get('PATHEXT', '').lower().split(';')
if (sabnzbd.WIN32 and os.path.splitext(script)[1].lower() in PATHEXT and \
not (win32api.GetFileAttributes(script) & win32file.FILE_ATTRIBUTE_HIDDEN)) or \
script.endswith('.py') or \
(not sabnzbd.WIN32 and os.access(script, os.X_OK) and not os.path.basename(script).startswith('.')):
lst.append(os.path.basename(script))
In order to run a script, it needs to be "executable" for Windows.
So if you have the script bla.pl, it should be executable by just using "bla.pl" on the command line
and not only with "perl bla.pl".