Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

error when torrent opened #7

@tejt99

Description

@tejt99

Hi thanks for all your help with #3 that command now works without errors, however when I run:

python3 -m pythorrent --file "FOOL'S GOLD _DAY OFF FIRE_.torrent" --path . --log=info
I get a large error:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/theoturner/Downloads/python-pythorrent-master/pythorrent/main.py", line 48, in
client.run()
File "/Users/theoturner/Downloads/python-pythorrent-master/pythorrent/torrent.py", line 343, in run
for peer in self.peers.values()[:self.MAX_PEERS]:
File "/Users/theoturner/Downloads/python-pythorrent-master/pythorrent/torrent.py", line 293, in peers
for peer_store in self.peer_stores.values():
File "/Users/theoturner/Downloads/python-pythorrent-master/pythorrent/torrent.py", line 246, in peer_stores
self._peer_stores[url] = store_from_url(url)(url, self)
File "/Users/theoturner/Downloads/python-pythorrent-master/pythorrent/peer_stores.py", line 47, in store_from_url
parsed_url = urlparse(url)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 367, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 123, in _coerce_args
return _decode_args(args) + (_encode_result,)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 107, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 107, in
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 'list' object has no attribute 'decode'
I have no idea where this is caused, if it's in the module itself or in your script. Thanks again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions