Skip to content

AttributeError: 'module' object has no attribute 'encode' #1

@IsmailM

Description

@IsmailM

Hey,

I'm having some difficulty in getting bencode working:

pip install bencode.py
import bencode

bencode.encode({'title': 'Example'})

# ---------------------------------------------------------------------------
# AttributeError                            Traceback (most recent call last)
# <ipython-input-17-f26380d80be9> in <module>()
#       3 import bencode
#       4 
# ----> 5 bencode.encode({'title': 'Example'})

# AttributeError: 'module' object has no attribute 'encode'

I would really appreciate a pointer in where I'm going wrong.

Btw, I'm using Python 2.7.10.

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