Description
When a user attempts to use a mongodb+srv:// connection string when dnspython is not installed we raise this error:
>>> client = pymongo.MongoClient(
|
... "mongodb+srv://<username>:<password>@<cluster-url>/test?retryWrites=true&w=majority")
|
Traceback (most recent call last):
|
File "<stdin>", line 1, in <module>
|
File "/Users/shane/.venv/lib/python3.9/site-packages/pymongo/mongo_client.py", line 639, in __init__
|
res = uri_parser.parse_uri(
|
File "/Users/shane/.venv/lib/python3.9/site-packages/pymongo/uri_parser.py", line 428, in parse_uri
|
raise ConfigurationError('The "dnspython" module must be '
|
pymongo.errors.ConfigurationError: The "dnspython" module must be installed to use mongodb+srv:// URIs
|
We should generate the command they need to run so they can copy/paste it, like this:
pymongo.errors.ConfigurationError: The "dnspython" module must be installed to use mongodb+srv:// URIs. To fix this error install pymongo with the srv extra:
|
/Users/shane/git/mongo-python-driver/.venv/bin/python -m pip install 'pymongo[srv]'
|
Attachments
Issue Links
- is related to
-
PYTHON-2640 Replace dnspython with our own SRV dns implementation
-
- Closed
-
-
MOTOR-706 Include tornado and dnspython as install_Requires
-
- Closed
-
-
PYTHON-2643 requirements.txt
-
- Closed
-
- related to
-
DOCS-14274 Recommend installing python driver with 'pymongo[srv]' to support SRV
-
- Closed
-
- mentioned in
-
Page Loading...