`pymongo.database.Database.authenticate()` has been dropped since pymongo 4.0
fwanghe opened this issue · 1 comments
fwanghe commented
The mongodb connection fails when username and password are available in the config.yaml.
plynx-master-worker | INFO:root:Try db connection
plynx-master-worker | Traceback (most recent call last):
plynx-master-worker | File "<string>", line 1, in <module>
plynx-master-worker | File "/app/plynx/bin/__init__.py", line 15, in main
plynx-master-worker | args.func(kwargs)
plynx-master-worker | File "/app/plynx/bin/cli.py", line 48, in worker
plynx-master-worker | run_worker(**args)
plynx-master-worker | File "/app/plynx/service/worker.py", line 209, in run_worker
plynx-master-worker | check_connection()
plynx-master-worker | File "/app/plynx/utils/db_connector.py", line 59, in check_connection
plynx-master-worker | get_db_connector().client.server_info()
plynx-master-worker | File "/app/plynx/utils/db_connector.py", line 50, in get_db_connector
plynx-master-worker | _DB.authenticate(connection_config.user, connection_config.password)
plynx-master-worker | File "/usr/local/lib/python3.8/site-packages/pymongo/collection.py", line 3160, in __call__
plynx-master-worker | raise TypeError(
plynx-master-worker | 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.
khaxis commented
Thank you! Your PR has been merged