Skip to content
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

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

Open
IsmailM opened this issue Feb 27, 2017 · 2 comments
Open

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

IsmailM opened this issue Feb 27, 2017 · 2 comments

Comments

@IsmailM
Copy link

IsmailM commented Feb 27, 2017

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.

@fuzeman
Copy link
Owner

fuzeman commented Feb 28, 2017

This is probably caused by a conflicting package that is using the same module name.

All these packages use the same module name (so only one can be installed):


I'm thinking it might be best to change the name of the package to avoid conflicts with these other existing packages...

@ExSidius
Copy link
Contributor

@IsmailM pip install bencode.py should resolve the package conflict (assuming you uninstall all bencodes before).

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

3 participants