post processing on Linux with python script
Posted: March 3rd, 2010, 8:59 am
This python Prowl script I found on this forum.
I named it Prowl.py, and it runs fine under OSX, but when I try to run it as a post-processing script in Linux (actually on a QNAP TS-509) I get the error:
Any suggestions for a linux noob?
Code: Select all
import sys,urllib
# Get clean NZB name
job_name = sys.argv[3]
# Prowl API settings - http://prowl.weks.net/api.php
# Set Prowl API
API = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Set Prowl priority. 0 - Normal, 2 - Emergency, -2 - Very Low
priority = "0"
# Set job title/event name
job_title = "Download%20Complete"
# Get current date/time and strip spaces
from time import gmtime, strftime
event_time = strftime("%d/%m/%y %H:%M")
event_time=event_time.replace(' ', '%20')
# URL encode chars from NZB name that cause issues
job_name=job_name.replace(' ', '%20')
job_name=job_name.replace('_', '%20')
job_name=job_name.replace('.', '%20')
# Send download complete notification to iPhone - swap 'job_title' for 'event_time' if completion time is required instead of 'Download Complete'
urllib.urlopen("https://prowl.weks.net/publicapi/add?apikey=" + API + "&priority=" + priority + "&application=SABnzbd&event=" + event_time + "&description=" + job_name)
I have placed the script in accessible shares, and through a Web File Manager changed the file permissions for Prowl.py to 777, but to no avail.Exit(-1) Cannot run script
Any suggestions for a linux noob?