webpy-mongodb-sessions throws ImportError: No module named binary

207 views
Skip to first unread message

*

unread,
Nov 15, 2012, 3:00:29 PM11/15/12
to we...@googlegroups.com
Regarding yesterday's questions....

It's best to use the github version of webpy-mongodb-sessions :-)
Commit 8185f7b45e6180fab2b7c0a81a32e0b8101c06ef seems to address some of the problems I was having. The commit message says:
Install bson version >=0.3.3 then import Binary from bson.binary, not pymongo.binary (where it seems to no longer exist)

At the Python console, now I can do "from webpy_mongodb_sessions.session import MongoStore" :-)

Though I couldn't find much in the pip docs about installing from some git repository, it was easy to google...
If I'm remembering correctly, it was something like:
pip install git+https://github.com/whilefalse/webpy-mongodb-sessions.git












I'm having some problems with webpy-mongodb-sessions.

I'm using:
1. freshly compiled Python...
2. pip and virtualenv
pip install pymongo > install_log http://paste.lisp.org/+2V7A
pip install web.py > install_log: http://paste.lisp.org/+2V7B
pip install webpy-mongodb-sessions > install_log: http://paste.lisp.org/+2V7C

I'm trying the following imports from the webpy-mongodb-sessions readme file: import web, from session import MongoStore

I get the following errors. Any ideas on what I could be doing wrong are appreciated. Thanks!!!!

(admin_setup)~/pys/admin_
setup% python
Python 2.7.3 (default, Nov 14 2012, 17:00:03)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import web
>>> from session import MongoStore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named session
>>>

(admin_setup)~/pys/admin_setup% python
Python 2.7.3 (default, Nov 14 2012, 17:00:03)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import web
>>> from webpy_mongodb_sessions.session import MongoStore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
  "/home/i/pys/admin_setup/lib/python2.7/site-packages/webpy_mongodb_sessions/session.py",
  line 2, in <module>
    from pymongo.binary import Binary
ImportError: No module named binary
>>>
Reply all
Reply to author
Forward
0 new messages