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

Cannot import module Binary #73

Closed
yuan8421 opened this issue Feb 5, 2018 · 4 comments
Closed

Cannot import module Binary #73

yuan8421 opened this issue Feb 5, 2018 · 4 comments

Comments

@yuan8421
Copy link

yuan8421 commented Feb 5, 2018

Hi Community,

I'm pretty new to the bson.
I installed the bson using

sudo pip install bson

The rosbridge_suit depends on bson, specifically bson.Binary
After install the latest version of bson which is 0.5.1, it will argue that

'module' object has no attribute 'Binary'
I did some fix by myself. But it will be good have a official fix for this problem.
I also tried to follow the api page of python
https://api.mongodb.com/python/2.7.2/api/bson/binary.html
to import Binary using

from bson.binary import Binary

It argues

from bson.binary import Binary
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named binary

I have fix it by some ugly modification. But if anyone could tell me what happened will be great!

@Rubiel1
Copy link

Rubiel1 commented Aug 23, 2018

Hi,
I installed "bson-0.5.6" and I have similar problem

from bson.binary import Binary
ImportError: No module named binary

How did you solve it @yuan8421 ?

@Rubiel1
Copy link

Rubiel1 commented Aug 26, 2018

Well, my solution was to work with MongoDB.

@Parkayun
Copy link
Member

You should install pymongo instead of bson. it's different package.

@banderlog
Copy link

banderlog commented Jul 9, 2019

You should install bson and THAN pymongo or just install pymongo per se (it comes with its own bson). After it you will be able to do bson.Binary. From #82

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

4 participants