Menu

#13 AttributeError: 'list' object has no attribute 'split'

open
nobody
None
5
2010-05-24
2010-05-24
arctan1701
No

Sometimes when _get_scrape_url is called, announce_url is a string and sometimes it is a list containing a single string. When announce_url is a list

l = announce_url.split('/')

fails since split needs to operate on a string.

before saving a torrent, announce_url often receives the values like these

http://tracker.openbittorrent.com/announce
['http://tracker.openbittorrent.com:80/announce']
['udp://tracker.openbittorrent.com:80/announce']
['http://tracker.publicbt.com:80/announce']

obviously, the type needs to be consistent.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB