Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法在此行将服务器上的 mongodb 与 debian 和 python 2.6.6 连接起来:
connection = pymongo.Connection('mongodb://localhost', safe = True)
TypeError:init()得到了一个意外的关键字参数“安全”
相同的代码适用于带有 python 2.7.3 的窗口机器。你能解释一下如何纠正这个错误吗?
我在它工作的机器上安装了 pymongo 2.3 版,在它不工作的地方安装了 1.7 版。
好像您正在使用不同版本的 pymongo。
确保两台服务器都安装了相同的 pymongo 版本。可能版本不匹配,连接构造函数的参数列表略有不同。