An error occurred as below.
Traceback (most recent call last):
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 42, in __get__
return obj.__dict__[self.__name__]
KeyError: 'collection'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 42, in __get__
return obj.__dict__[self.__name__]
KeyError: 'database'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 432, in main
run()
File "c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 316, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Program Files\Python37\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Program Files\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "d:\GitHub\org\dev\backend\tests\workertest.py", line 22, in <module>
print('Task finished? ', result.ready())
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\result.py", line 313, in ready
return self.state in self.backend.READY_STATES
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\result.py", line 473, in state
return self._get_task_meta()['status']
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\result.py", line 412, in _get_task_meta
return self._maybe_set_cache(self.backend.get_task_meta(self.id))
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\base.py", line 386, in get_task_meta
meta = self._get_task_meta_for(task_id)
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 206, in _get_task_meta_for
obj = self.collection.find_one({'_id': task_id})
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 44, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 293, in collection
collection = self.database[self.taskmeta_collection]
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 44, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 288, in database
return self._get_database()
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 271, in _get_database
conn = self._get_connection()
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 161, in _get_connection
self._connection = MongoClient(**conf)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\mongo_client.py", line 668, in __init__
username, password, dbase, opts)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\client_options.py", line 151, in __init__
username, password, database, options)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\client_options.py", line 39, in _parse_credentials
mechanism, source, username, password, options, database)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\auth.py", line 107, in _build_credentials_tuple
raise ConfigurationError("%s requires a username." % (mech,))
pymongo.errors.ConfigurationError: SCRAM-SHA-256 requires a username.
Checklist
contribution guide
on reporting bugs.
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the master branch.
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
celery -A proj reportin the issue.(if you are not able to do this, then at least specify the Celery
version affected).
masterbranch of Celery.pip freezein the issue.to reproduce this bug.
Optional Debugging Information
and/or implementation.
result backend.
broker and/or result backend.
ETA/Countdown & rate limits disabled.
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
Possible Duplicates
Environment & Settings
Celery version: 4.3.0 with fixes in PR #5527
celery reportOutput:Steps to Reproduce
mongodb://admin:[email protected]/task?authSource=admin&authMechanism=SCRAM-SHA-256
Required Dependencies
Python Packages
pip freezeOutput:Other Dependencies
MongoDB:
Version: >= 3.0.0
Minimally Reproducible Test Case
Details
Expected Behavior
Support all the authentication options listed at authentication-options, including authSource, authMechanism, authMechanismProperties and gssapiServiceName.
Actual Behavior
An error occurred as below.