Problem with Execute plugin

Suggest, post, or discuss plugins for Deluge
Post Reply
overlord
New User
New User
Posts: 6
Joined: Tue Sep 23, 2014 4:09 am

Problem with Execute plugin

Post by overlord »

I'm trying to run a python script after completion of download. This script used to work, but I recently moved everything to a new server. I can run the script manually and it works perfectly. When deluge runs it, I get the following in the /var/log/deluged/daemon.log

Code: Select all

[WARNING ] 20:13:06 core:124 [execute] command '/home/deluge/flexget/deluge_torrent_complete.py
' failed with exit code 1
[WARNING ] 20:13:06 core:128 [execute] stderr: Upon execvpe /home/deluge/flexget/deluge_torrent_complete.py
 ['/home/deluge/flexget/deluge_torrent_complete.py\n', 'c74148acb4c0bfc064d7281da4de24a01cc550af', 'Torrent name', 'path'] in environment id 140113411545640
:Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 403, in _fork
    path, uid, gid, executable, args, environment)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 453, in _execChild
    os.execvpe(executable, args, environment)
  File "/usr/lib/python2.7/os.py", line 353, in execvpe
    _execvpe(file, args, env)
  File "/usr/lib/python2.7/os.py", line 368, in _execvpe
    func(file, *argrest)
OSError: [Errno 2] No such file or directory

Any ideas?
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Problem with Execute plugin

Post by Cas »

What did you put in the execute command?
overlord
New User
New User
Posts: 6
Joined: Tue Sep 23, 2014 4:09 am

Re: Problem with Execute plugin

Post by overlord »

My execute command in the config is:

/home/deluge/flexget/deluge_torrent_complete.py
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Problem with Execute plugin

Post by Cas »

Rereading the log I can now see there is a newline appended to the filename, delete that whitespace and it should work. If you could open a ticket that would be helpful and it can be fixed.
overlord
New User
New User
Posts: 6
Joined: Tue Sep 23, 2014 4:09 am

Re: Problem with Execute plugin

Post by overlord »

I saw that newline as well, but the entry on the config page doesn't have a newline and the entry in the config file doesn't have a newline either, not sure where that is coming from. I can submit a ticket, but I can't find anywhere to ditch the newline

my execute.conf is as follows:

Code: Select all

{
  "file": 1,
  "format": 1
}{
  "commands": [
    [
      "84c3f73b9b91f7ce7d2993ed5ab55fcb27e1dbc1",
      "complete",
      "/home/deluge/flexget/deluge_torrent_complete.py"
    ]
  ]
}
overlord
New User
New User
Posts: 6
Joined: Tue Sep 23, 2014 4:09 am

Re: Problem with Execute plugin

Post by overlord »

So, I decided to delete the execute.conf file and let it re-create itself. Now the script is working. Wish I knew what caused it to fail before, but glad it's working now.

Thanks for the pointer
Post Reply