#1943 closed bug (Fixed)
Session handling breaks AutoAdd plugin
Reported by: | Elberet | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 2.x |
Component: | Core | Version: | master |
Keywords: | Cc: | non7top@gmail.com |
Description
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.
Attachments (2)
Change History (10)
by , 13 years ago
Attachment: | commit-dd1c179 added |
---|
comment:1 by , 13 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
Latest patch "fix_session_lookup_error.patch (1.3 KB) - added by non7top" doesn't resolve the problem. I think I'll have to switch back to some earlier revision.
comment:5 by , 12 years ago
Status: | new → pending |
---|
I've just committed this fix:
http://git.deluge-torrent.org/deluge/commit/?id=5dc6dbf216f1e02992761d7ad10cc911b5c416e0
Can you please test it?
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | pending → closed |
fix session lookup error