pymongo error when writing
问题 I am unable to do any writes to a remote mongodb database. I am able to connect and do lookups (e.g. find). I connect like this: conn = pymongo.MongoClient(db_uri,slaveOK=True) db = conn.test_database coll = db.test_collection But when I try to insert, coll.insert({'a':1}) I run into an error: --------------------------------------------------------------------------- AutoReconnect Traceback (most recent call last) <ipython-input-56-d4ffb9e3fa79> in <module>() ----> 1 coll.insert({'a':1})