pymongo error when connecting to test:27017
This is my code:
con = pymongo.Connection('test',27017)
and the error is:
(mysite)zjm1126@zjm1126-G41MT-S2:~/桌面/test/mongo$ python a.py
Traceback (most recent call last):
File "a.py", line 3, in <module>
con = pymongo.Connection('test',27017,slave_okay=True)
File "build/bdist.linux-i686/egg/pymongo/connection.py", line 352, in __init__
File "build/bdist.linux-i686/egg/pymongo/connection.py", line 576, in __find_mas开发者_StackOverflowter
What can I do?
EDIT:
Change 'test' to 'localhost'
Obviously there is no mongod daemon running on test:27017.
精彩评论