Ask Your Question

Revision history [back]

Can't import Connection from pymongo

Hi,

I am trying to use mongodb_log, however when I start the application using

$ rosrun ngodb_log mongodb_log -a

I get an error saying:

Traceback (most recent call last):
File "/home/<xxxx>/KnowRob_ws/src/mongodb_log/bin/mongodb_log", line 68, in <module>
    from pymongo import Connection, SLOW_ONLY
ImportError: cannot import name Connection

Looking into the pymongo source code from git I indeed cannot find a class named Connection. I do however find a class named MongoClient, which takes the same arguments. Changing mongodb_log.py from 'Connection' to 'MongoClient' allows me to run the application with the following output:

Updated graphs, total queue size 0, dropped 0, took 0:00:00.000381
Updated graphs, total queue size 0, dropped 0, took 0:00:00.000393
...

Is this a bug or am I missing something? Or should I contact the pymongo maintainer?

Can't import Connection from pymongo

Hi,

I am trying to use mongodb_log, however mongodb_log

I installed it using:

$ git clone git://github.com/mongodb/mongo-python-driver.git pymongo
$ cd pymongo/
$ python setup.py install

However, when I start the application using using:

$ rosrun ngodb_log mongodb_log -a

I get an error saying:

Traceback (most recent call last):
File "/home/<xxxx>/KnowRob_ws/src/mongodb_log/bin/mongodb_log", line 68, in <module>
    from pymongo import Connection, SLOW_ONLY
ImportError: cannot import name Connection

Looking into the pymongo source code from git I indeed cannot find a class named Connection. I do however find a class named MongoClient, which takes the same arguments. Changing mongodb_log.py from 'Connection' to 'MongoClient' allows me to run the application with the following output:

Updated graphs, total queue size 0, dropped 0, took 0:00:00.000381
Updated graphs, total queue size 0, dropped 0, took 0:00:00.000393
...

Is this a bug or am I missing something? Or should I contact the pymongo maintainer?

Can't import Connection from pymongo

Hi,

I am trying to use mongodb_log

I installed it using:

$ git clone git://github.com/mongodb/mongo-python-driver.git pymongo
$ cd pymongo/
$ python setup.py install

However, when I start the application using:

$ rosrun ngodb_log mongodb_log -a

I get an error saying:

Traceback (most recent call last):
File "/home/<xxxx>/KnowRob_ws/src/mongodb_log/bin/mongodb_log", line 68, in <module>
    from pymongo import Connection, SLOW_ONLY
ImportError: cannot import name Connection

Looking into the pymongo source code from git I indeed cannot find a class named Connection. I do however find a class named MongoClient, which takes the same arguments. Changing mongodb_log.py from 'Connection' to 'MongoClient' allows me to run the application with the following output:

Updated graphs, total queue size 0, dropped 0, took 0:00:00.000381
Updated graphs, total queue size 0, dropped 0, took 0:00:00.000393
...

Is this a bug or am I missing something? Or should I contact the pymongo maintainer?

Can't import Connection from pymongo

Hi,

I am trying to use mongodb_log

I installed mongodb_log with:

git clone https://github.com/timn/ros-mongodb_log.git mongodb_log
cd mongodb_log
make

I also installed pymongo with:

$ git clone git://github.com/mongodb/mongo-python-driver.git pymongo
$ cd pymongo/
$ python setup.py install

However, when I start the application using:

$ rosrun ngodb_log mongodb_log -a

I get an error saying:

Traceback (most recent call last):
File "/home/<xxxx>/KnowRob_ws/src/mongodb_log/bin/mongodb_log", line 68, in <module>
    from pymongo import Connection, SLOW_ONLY
ImportError: cannot import name Connection

Looking into the pymongo source code from git I indeed cannot find a class named Connection. I do however find a class named MongoClient, which takes the same arguments. Changing mongodb_log.py from 'Connection' to 'MongoClient' allows me to run the application with the following output:

Updated graphs, total queue size 0, dropped 0, took 0:00:00.000381
Updated graphs, total queue size 0, dropped 0, took 0:00:00.000393
...

Is this a bug or am I missing something? Or should I contact the pymongo maintainer?

Can't import Connection from pymongo

Hi,

I am trying to use mongodb_log

I installed mongodb_log with:

git clone https://github.com/timn/ros-mongodb_log.git mongodb_log
cd mongodb_log
make

I also installed pymongo with:

$ git clone git://github.com/mongodb/mongo-python-driver.git pymongo
$ cd pymongo/
$ python setup.py install

However, when I start the application using:

$ rosrun ngodb_log mongodb_log -a

I get an error saying:

Traceback (most recent call last):
File "/home/<xxxx>/KnowRob_ws/src/mongodb_log/bin/mongodb_log", line 68, in <module>
    from pymongo import Connection, SLOW_ONLY
ImportError: cannot import name Connection

Looking into the pymongo source code from git I indeed cannot find a class named Connection. I do however find a class named MongoClient, which takes the same arguments. Changing mongodb_log.py from 'Connection' to 'MongoClient' allows me to run the application with the following output:

Updated graphs, total queue size 0, dropped 0, took 0:00:00.000381
Updated graphs, total queue size 0, dropped 0, took 0:00:00.000393
...

Is this a bug or am I missing something? Or should I contact the pymongo maintainer?