Skip to content

Decoding of example fails #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dreua opened this issue Apr 30, 2020 · 0 comments
Closed

Decoding of example fails #13

dreua opened this issue Apr 30, 2020 · 0 comments

Comments

@dreua
Copy link

dreua commented Apr 30, 2020

$ python3
Python 3.7.7 (default, Mar 13 2020, 10:23:39) 
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bencode
>>> bencode.decode('d5:title7:Examplee')
Traceback (most recent call last):
  File "/home/da/.local/lib/python3.7/site-packages/bencode/__init__.py", line 180, in bdecode
    r, l = decode_func[value[0:1]](value, 0)
KeyError: 'd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/da/.local/lib/python3.7/site-packages/bencode/__init__.py", line 182, in bdecode
    raise BencodeDecodeError("not a valid bencoded string")
bencode.exceptions.BencodeDecodeError: not a valid bencoded string

$ pip3 install --user bencode.py
Requirement already satisfied: bencode.py in ./.local/lib/python3.7/site-packages (2.1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant