Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14274

Recommend installing python driver with 'pymongo[srv]' to support SRV

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: drivers
    • Labels:
      None
    • 1

      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.)

            Assignee:
            nathan.leniz@mongodb.com Nathan Leniz
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 years, 7 weeks, 4 days ago