Using deluged and deluge-gtk both 98ca371b15596a2d9ffe120ddb1ed47e62583da2 on "Ubuntu 10.10"
This happens when you open and close the prefs dialog while connected to deluged and the "AutoAdd" plugin is enabled. It seems the event "AutoaddOptionsChangedEvent" isn't registered properly.
04:22:00.457 [deluge.ui.gtkui.preferences :813 ][DEBUG ] on_button_ok_clicked
04:22:00.458 [deluge.ui.gtkui.pluginmanager :113 ][DEBUG ] run_on_apply_prefs
04:22:00.459 [deluge.plugin.autoadd.gtkui :330 ][DEBUG ] applying prefs for AutoAdd
04:22:00.486 [twisted :508 ][INFO ] Error In <<class 'twisted.internet.tcp.TLSConnection'> to ('127.0.0.1', 58847) at 97cedcc>
04:22:00.538 [twisted :508 ][ERROR ] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/lib/python2.6/dist-packages/twisted/internet/gtk2reactor.py", line 288, in _doReadOrWrite
why = source.doRead()
File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 137, in doRead
return Connection.doRead(self)
File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 460, in doRead
return self.protocol.dataReceived(data)
File "/home/<uname>/lib/python/deluge-1.3.900_dev-py2.6.egg/deluge/ui/client.py", line 174, in dataReceived
event = known_events[event_name](*request[2])
exceptions.KeyError: 'AutoaddOptionsChangedEvent'
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/lib/python2.6/dist-packages/twisted/internet/gtk2reactor.py", line 288, in _doReadOrWrite
why = source.doRead()
File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 137, in doRead
return Connection.doRead(self)
File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 460, in doRead
return self.protocol.dataReceived(data)
File "/home/<uname>/lib/python/deluge-1.3.900_dev-py2.6.egg/deluge/ui/client.py", line 174, in dataReceived
event = known_events[event_name](*request[2])
exceptions.KeyError: 'AutoaddOptionsChangedEvent'
04:22:00.540 [deluge.ui.client :232 ][INFO ] Connection lost to daemon at 127.0.0.1:58847 reason: 'AutoaddOptionsChangedEvent'
04:22:00.545 [deluge.component :235 ][DEBUG ] Deregistering Component: GtkPlugin.AutoAdd
04:22:00.545 [deluge.pluginmanagerbase :163 ][INFO ] Plugin AutoAdd disabled..
This was bugging me to no end since it disconnects the gtk-ui every time you you click OK on the prefs dialog or you make any plugin change. This fix seems to work I'm really not sure about it though.
Afaics plugins don't even attempt to register them selfs with deluge.event. Yet DelugeRPCProtocol tries to get keyword arguments from deluge.event for every event it receives, which fails at least for the AutoAdd. No idea what you guys are planing here, since you obviously didn't merge this event stuff into 1.3. Well here is a temp fix patch.