error code: client = pymongo.MongoClient("mongodb+srv://********?retryWrites=true&w=majority") File "/home/ubuntu/.local/lib/python3.6/site-packages/pymongo/mongo_client.py", line 621, in init connect_timeout=timeout) File "/home/ubuntu/.local/lib/python3.6/site-packages/pymongo/uri_parser.py", line 463, in parse_uri nodes = dns_resolver.get_hosts() File "/home/ubuntu/.local/lib/python3.6/site-packages/pymongo/srv_resolver.py", line 102, in get_hosts _, nodes = self._get_srv_response_and_hosts(True) File "/home/ubuntu/.local/lib/python3.6/site-packages/pymongo/srv_resolver.py", line 83, in _get_srv_response_and_hosts results = self._resolve_uri(encapsulate_errors) File "/home/ubuntu/.local/lib/python3.6/site-packages/pymongo/srv_resolver.py", line 79, in _resolve_uri raise ConfigurationError(str(exc)) pymongo.errors.ConfigurationError: query() got an unexpected keyword argument 'lifetime'
versions: python 3 pymongo: 3.10.1
dsnpython
withpip install dsnpython --user
– learn2day