Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何修复pymongo.errors.OperationFailure:_Python_Pymongo - Fatal编程技术网

Python 如何修复pymongo.errors.OperationFailure:

Python 如何修复pymongo.errors.OperationFailure:,python,pymongo,Python,Pymongo,我得到的错误是: pymongo.errors.OperationFailure: bad auth : Authentication failed., full error: {'ok': 0, 'errmsg': 'bad auth : Authentication failed.', 'code': 8000, 'codeName': 'AtlasError'} 到目前为止,您尝试了什么?请检查用于连接MongoDB的用户名和密码。用户名或密码不正确时会发生此错误。已尝试..失败..已决

我得到的错误是:

pymongo.errors.OperationFailure: bad auth : Authentication failed., full error: {'ok': 0, 'errmsg': 'bad auth : Authentication failed.', 'code': 8000, 'codeName': 'AtlasError'}

到目前为止,您尝试了什么?请检查用于连接MongoDB的用户名和密码。用户名或密码不正确时会发生此错误。已尝试..失败..已决定在本地数据库上托管