Script not running on completion

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
sbjaved
Posts: 6
Joined: Thu Feb 16, 2012 9:53 am

Script not running on completion

Post by sbjaved »

I have this python script that moves torrent files after download. For some reason its not run upon completion of torrent. I'm running transmission 2.51.
The script runs fine in terminal. Its quite long so I'm not posting it.

Code: Select all

"script-torrent-done-enabled": true, 
"script-torrent-done-filename": "/home/saad/Code/turbo_sort_patched.py"

Code: Select all

-rwxrwxrwx 1 saad saad 12528 Oct 25 08:00 turbo_sort_patched.py
??
sbjaved
Posts: 6
Joined: Thu Feb 16, 2012 9:53 am

Re: Script not running on completion

Post by sbjaved »

I ran transmission with logging enabled. The log file shows these errors for the script:
http://pastie.org/5117136
sbjaved
Posts: 6
Joined: Thu Feb 16, 2012 9:53 am

Re: Script not running on completion

Post by sbjaved »

Okay, I hope this helps someone. After a lot of log searching and script debugging. I found out that the python interpreter was not being launched because the line of code in the script used to launch python had spaces in it :D
# !/usr/bin/env python
It should have been:
#!/usr/bin/env python
Lesson: CHECK YOUR SCRIPT!
Post Reply