No scripts options after update.

Get help with all aspects of SABnzbd
Forum rules
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.
Post Reply
topdeck
Newbie
Newbie
Posts: 6
Joined: September 1st, 2008, 6:31 pm

No scripts options after update.

Post 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.
Image
When I go to the Categories menu there are no scripts in the dropdown:
Image
Prior to the update everything was working perfectly. :/
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: No scripts options after update.

Post by sander »

Which OS? On Windows, I believe you need to set PATHEXT

And is the executable bit of the script set?
topdeck
Newbie
Newbie
Posts: 6
Joined: September 1st, 2008, 6:31 pm

Re: No scripts options after update.

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: No scripts options after update.

Post 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".
Post Reply