Opened 3 years ago

#3498 new bug

KeyError exception in sessionproxy when deleting torrents

Reported by: DjLegolas Owned by:
Priority: minor Milestone: 2.0.6
Component: Core Version: 2.0.0
Keywords: Cc:

Description

I noticed that when I delete several torrent from the GTK UI, there are some KeyError prints in the log:

Unhandled error in Deferred:

Traceback (most recent call last):
  File "C:\develops\python\deluge\deluge\transfer.py", line 126, in _handle_complete_message
    self.message_received(
  File "C:\develops\python\deluge\deluge\ui\client.py", line 130, in message_received
    d.callback(request[2])
  File "C:\Python38\lib\site-packages\twisted\internet\defer.py", line 460, in callback
    self._startRunCallbacks(result)
  File "C:\Python38\lib\site-packages\twisted\internet\defer.py", line 568, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "C:\Python38\lib\site-packages\twisted\internet\defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "C:\develops\python\deluge\deluge\ui\sessionproxy.py", line 153, in on_status
    self.torrents[torrent_id][0] = t
builtins.KeyError: 'f737866cd33b35f63c848db4b5f0b3e32f8c1ead'

Unhandled error in Deferred:

Traceback (most recent call last):
  File "C:\develops\python\deluge\deluge\transfer.py", line 126, in _handle_complete_message
    self.message_received(
  File "C:\develops\python\deluge\deluge\ui\client.py", line 130, in message_received
    d.callback(request[2])
  File "C:\Python38\lib\site-packages\twisted\internet\defer.py", line 460, in callback
    self._startRunCallbacks(result)
  File "C:\Python38\lib\site-packages\twisted\internet\defer.py", line 568, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "C:\Python38\lib\site-packages\twisted\internet\defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "C:\develops\python\deluge\deluge\ui\sessionproxy.py", line 153, in on_status
    self.torrents[torrent_id][0] = t
builtins.KeyError: 'f737866cd33b35f63c848db4b5f0b3e32f8c1ead'

It seem as the on_status callback is being called after the torrent was removed.

Change History (0)

Note: See TracTickets for help on using tickets.