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

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

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • Major - P3
    • Resolution: Fixed
    • None
    • None
    • drivers
    • None
    • 1
    • DevEd Q1S3 Haleakalā 03/02
    • true

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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                1 year, 23 weeks, 1 day ago