[SOLVED] Problem with Execute plugin

Suggest, post, or discuss plugins for Deluge
Post Reply
lled
New User
New User
Posts: 3
Joined: Wed May 23, 2012 2:03 pm

[SOLVED] Problem with Execute plugin

Post by lled »

Hello,

I need to use Execute plugin with deluge-console. Then i've created the execute.conf file

Code: Select all

{
  "file": 1,
  "format": 1
}{
  "commands": [
   [
     "1",
     "complete",
     "/etc/btscanclient/sources/finished.py"
   ]
   [
     "1",
     "added",
     "/etc/btscanclient/sources/added.py"
   ]
  ]
}
But my scripts are not executed ( they work when i'm running them manually)

I think the problem come from execute.conf, when it is created via deluge-gtk an id is set for each script, so instead of "1", there is something like "a6fbfc3436343a8fa681443073cf2a73a4a597da"
But i can't install and execute deluge-gtk on this computer; So how can create execute.conf ?

Thank you
Lled
Last edited by lled on Tue May 29, 2012 8:34 am, edited 1 time in total.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Problem with Execute plugin

Post by Cas »

You should be using unique ids for the commands.

Have you tried setting up thinclient so you can use a remote deluge gtk client.
lled
New User
New User
Posts: 3
Joined: Wed May 23, 2012 2:03 pm

Re: Problem with Execute plugin

Post by lled »

Hi, i can't use thinclient because i need deluge-console (i'm calling it via some scripts).

After analyzing logs of deluged, i've found a problem when the daemon is trying to read execute.conf

Code: Select all

[DEBUG   ] 11:10:14 configmanager:111 Getting config 'execute.conf'
[DEBUG   ] 11:10:14 config:197 Setting 'commands' to [] of <type 'list'>
[ERROR   ] 11:10:14 config:387 Expecting , delimiter: line 8 column 5 (char 104)
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/deluge-1.3.4-py2.6.egg/deluge/config.py", line 385, in load
    self.__config.update(json.loads(data[start:end]))
  File "/usr/lib/python2.6/json/__init__.py", line 307, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.6/json/decoder.py", line 336, in raw_decode
    obj, end = self._scanner.iterscan(s, **kw).next()
  File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.6/json/decoder.py", line 183, in JSONObject
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.6/json/decoder.py", line 227, in JSONArray
    raise ValueError(errmsg("Expecting , delimiter", s, end))
ValueError: Expecting , delimiter: line 8 column 5 (char 104)
[WARNING ] 11:10:14 config:388 Unable to load config file: /root/.config/deluge/execute.conf
[DEBUG   ] 11:10:14 config:391 Config /root/.config/deluge/execute.conf version: 1.1 loaded: {'commands': []}
[DEBUG   ] 11:10:14 core:96 Execute core plugin enabled!
[INFO    ] 11:10:14 pluginmanagerbase:158 Plugin Execute enabled..

and this is my execute.conf a this moment :

Code: Select all

{
  "file": 1,
  "format": 1
}{
  "commands": [
   [
     "1",
     "complete",
     "/etc/btscanclient/sources/finished.py"
   ]
   [
     "2",
     "added",
     "/etc/btscanclient/sources/added.py"
   ]
  ]
}
Do you see something malformed in this file ?
Thank you :)
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Problem with Execute plugin

Post by johnnyg »

There should be a comma in between the the commands.
i.e. it should be:

Code: Select all

{
  "file": 1,
  "format": 1
}{
  "commands": [
   [
     "1",
     "complete",
     "/etc/btscanclient/sources/finished.py"
   ],
   [
     "2",
     "added",
     "/etc/btscanclient/sources/added.py"
   ]
  ]
}
Also, I highly recommend that you don't run deluge as root (especially with the execute plugin).
lled
New User
New User
Posts: 3
Joined: Wed May 23, 2012 2:03 pm

Re: Problem with Execute plugin

Post by lled »

Hi, problem solved !

And i will follow you advice about root user

Thank you.
Lled
Post Reply