Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#2926 closed bug (Fixed)

Bug in torrent.get_peers

Reported by: Cas Owned by:
Priority: minor Milestone: 2.0.0
Component: Core Version: develop
Keywords: Cc:

Description

Not sure how this occurred but code should handle None...

Unhandled Error
Traceback (most recent call last):
  File "/home/ubuntu/deluge.git/deluge/core/eventmanager.py", line 35, in emit
    handler(*event.args)
  File "/home/ubuntu/deluge.git/deluge/ui/sessionproxy.py", line 254, in on_torrent_added
    client.core.get_torrent_status(torrent_id, []).addCallback(on_status)
  File "/home/ubuntu/deluge.git/deluge/ui/client.py", line 517, in __call__
    return self.daemon.call(self.base, *args, **kwargs)
  File "/home/ubuntu/deluge.git/deluge/ui/client.py", line 467, in call
    m, *copy.deepcopy(args), **copy.deepcopy(kwargs)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/home/ubuntu/deluge.git/deluge/core/core.py", line 512, in get_torrent_status
    all_keys=not keys)
  File "/home/ubuntu/deluge.git/deluge/core/core.py", line 496, in create_torrent_status
    status = self.torrentmanager[torrent_id].get_status(torrent_keys, diff, update=update, all_keys=all_keys)
  File "/home/ubuntu/deluge.git/deluge/core/torrent.py", line 942, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/home/ubuntu/deluge.git/deluge/core/torrent.py", line 795, in get_peers
    country = ''.join([char if char.isalpha() else ' ' for char in country])
exceptions.TypeError: 'NoneType' object is not iterable

Change History (3)

comment:1 Changed 7 years ago by thekgb09

I was also experiencing an issue with this on openSUSE LEAP 42.2 running Deluged with a thin client. I tracked it down to an issue with the GeoIP Database location. By deleting this string the issue resolved while Deluge is still able to resolve the country flags.

Before this I could only connect to the daemon at first start and have it display the list of torrent files. Upon reconnect the torrent list would be empty even though it still downloads and seeds. After deleting the GeoIP string, the torrent list populates as expected.

comment:2 Changed 7 years ago by Cas

  • Component changed from Unknown to Core
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed: [fb8dc42ac]

comment:3 Changed 6 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.