#1943: Session handling breaks AutoAdd plugin
----------------------+-----------------------------------------------------
Reporter: Elberet | Owner:
Type: bug | Status: new
Priority: critical | Milestone: 1.4.0
Component: core | Version: git master
Keywords: |
----------------------+-----------------------------------------------------
Symptom:
{{{
17:41:08.104 [ERROR ][deluge.plugins.autoadd.core :295 ] Disabling
'/torrent/watch', error during update: [Failure instance: Traceback: <type
'exceptions.KeyError'>: -1
(snip!)
/usr/lib64/python2.7/site-
packages/deluge/plugins/AutoAdd-1.02-py2.7.egg/deluge/plugins/autoadd/core.py:242:update_watchdir
/usr/lib64/python2.7/site-packages/deluge/core/torrentmanager.py:406:add
/usr/lib64/python2.7/site-
packages/deluge/core/torrentmanager.py:289:get_torrent_list
/usr/lib64/python2.7/site-
packages/deluge/core/rpcserver.py:497:get_session_auth_level
}}}
This exception occurs whenever the AutoAdd plugin's update_watchdir runs,
finds a new .torrent file and tries to add the torrent while Deluge is
running in daemon mode and no client is connected. At that time, the
RPCServer's self.factory.session_id value is either -1 or the ID of the
session that last disconnected, while RPCServer's
self.factory.authorized_sessions is empty, resulting in a KeyError.
This occurred on a Gentoo Linux box running Linux 3.0.4-gentoo-r1 x86_64
on an Athlon 64 X2 with Python 2.7, twisted 11.0.0. Deluge is based on
commit 7227c97c, it is running headless and as a non-root user.
I have attached a quick and very, very dirty workaround.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/1943>
Deluge <http://deluge-torrent.org/>
Deluge project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/deluge-dev?hl=en.