无法指定Mongo实例操作:`'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.` #2641
2024-05-14 10:19:35,920 - default - WARNING - mongodb获取连接信息错误,错误信息Traceback (most recent call last):
File "/opt/archery/sql/engines/mongo.py", line 1206, in current_op
conn = self.get_connection()
^^^^^^^^^^^^^^^^^^^^^
File "/opt/archery/sql/engines/mongo.py", line 806, in get_connection
self.conn[self.db_name].authenticate(self.user, self.password, auth_db)
File "/opt/venv4archery/lib/python3.11/site-packages/pymongo/collection.py", line 3501, in __call__
raise TypeError(
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
重现步骤
预期外的结果
日志文本