pip uninstall pymongo
pip install pymongo==3.6
Enter the password
1. TypeError: ‘Collection’ object is not callable. If you meant to call the ‘authenticate’ method on a ‘Database’ object it is failing because no such method exists.
Can connect to its own mongodb database. I can but cannot insert data to the company server. You can insert data when running on someone else’s computer, so the key is your own environment. Either it is a mongodb version problem or a pymongo version problem.
ret = dbtable.insert_one(student)
2. OperationFailure: Authentication failed., Full error: {‘OK’: 0.0, ‘errmsg’: ‘authentication failed.’, ‘code’: 18, ‘codename’: ‘authenticationfailed.}
MongoDB inserts an error in data and authentication fails.
Solution:
Delete the latest version of pymongo. My MongoDB is also version 3.6
pip uninstall pymongo
pip install pymongo==3.6
Read More:
- Error in Python connection to mongodb pymongo.errors.OperationFailure : Authentication failed.
- Mongodb connection authentication auth failed solution
- Insert keyframe giving keying set failed to insert any key frames (solved)
- Insert keyframe giving keying set failed to insert any key frames
- greendao insert data UNIQUE constraint failed: PURCHASE_ORDER_TABLE._id (code 1555)
- Mybatis batch insert data
- MongoDB Error: Failed to start mongod.service: Unit mongodb.service is masked
- MySQL workbench insert data prompt error: 1046 (errorcode: 1046. No database select…)
- The mongoDB service failed to start (exception: connect failed)
- Authentication failed under GitHub desktop
- Mongodb failed to start: child process failed, exited with error number 100
- CDH HDFS webui browser authentication (after Kerberos authentication is enabled)
- Git push “fatal: Authentication failed ”
- Syntax error, insert “;” to complete Statement, insert “}” to complete Block
- 【Linux】psql: FATAL: Ident authentication failed for user “username” Error and Solution
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
- Pull the git warehouse code IDEA reports an error: Clone failed: Authentication failed for’http://10.xx.XXXXXXXXXXXXXXXXX’
- MongoDB:Failed: error connecting to db server: no reachable servers
- Failed insert module ‘autofs4’ error in deploying xenserver7.2
- No data: data: get host by name failed in TCP_ Connect() error resolution