我在pymongo尝试下面的命令:如何摆脱mongodb中的光标id错误?
records= db.collection_name.find({"gender":"female"}).batch_size(5)
但几次迭代后得出:
pymongo.errors.CursorNotFound: Cursor not found, cursor id: 61593385827.
另外,如果我尝试timeout=False
在同一个命令即
records= db.collection_name.find({"gender":"female"},timeout=False).batch_size(5)
其给出
TypeError: __init__() got an unexpected keyword argument 'timeout' error.