[DOCS-14274] Recommend installing python driver with 'pymongo[srv]' to support SRV Created: 05/Mar/21  Updated: 29/Oct/23  Resolved: 08/Mar/21

Status: Closed
Project: Documentation
Component/s: drivers
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Shane Harvey Assignee: Nathan Leniz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to PYTHON-2605 Improve mongodb+srv:// error message ... Closed
Participants:
Days since reply: 2 years, 48 weeks, 2 days ago
Story Points: 1

 Description   

Description

The documentation page for installing PyMongo should be updated to include the srv extra needed to connection to Atlas with "mongodb+srv://" connection strings:

python -m pip install 'pymongo[srv]'

Otherwise the user will get 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

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 08/Mar/21 ]

Author:

{'name': 'Nathan', 'email': 'nathan.leniz@10gen.com', 'username': 'terakilobyte'}

Message: recommend installation with srv (pymongo) (#727)

Generated at Thu Feb 08 08:09:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.