开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜