>>> client['localhost'].authenticate('','', mechanism='MONGODB-CR')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 1018, in authenticate
connect=True)
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 444, in _cache_credentials
sock_info.authenticate(credentials)
File "/usr/local/lib/python2.7/dist-packages/pymongo/pool.py", line 343, in authenticate
auth.authenticate(credentials, self)
File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 464, in authenticate
auth_func(credentials, sock_info)
File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 432, in _authenticate_mongo_cr
key = _auth_key(nonce, username, password)
File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 266, in _auth_key
digest = _password_digest(username, password)
File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 252, in _password_digest
raise ValueError("password can't be empty")
ValueError: password can't be empty
>>> client['localhost'].authenticate('',None, mechanism='MONGODB-CR')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pymongo/database.py", line 1013, in authenticate
validated_options)
File "/usr/local/lib/python2.7/dist-packages/pymongo/auth.py", line 77, in _build_credentials_tuple
raise ConfigurationError("A password is required.")
pymongo.errors.ConfigurationError: A password is required.