title: pymongo.errors.ConfigurationError: The "dnspython" module must be installed to use mongodb+srv:// URIs
body: <p>I am trying to connect to my MongoDB Cluster using the SRV scheme and I am encountering a problem while trying to connect.
  Below is the code I've tried</p>
  
  <pre class="lang-py prettyprint-override"><code>from motor import motor_asyncio
  motor_client = motor_asyncio.AsyncIOMotorClient('mongodb+srv://&lt;user&gt;:&lt;password&gt;@examplecluster-ece7n.azure.mongodb.net/test?retryWrites=true&amp;w=majority')
  _db = self.motor_client.translations
  _collection = _db.translations_collections
  </code></pre>
  
  <p>I have dnspython module installed but this is the error that still pops up:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site-packages/libneko/extras/superuser.py", line 176, in execute_in_session
      result = await locals()["aexec"](ctx, ctx.bot)
    File "&lt;string&gt;", line 4, in aexec
    File "/usr/local/lib/python3.7/site-packages/motor/core.py", line 141, in __init__
      delegate = self.__delegate_class__(*args, **kwargs)
    File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 524, in __init__
      res = uri_parser.parse_uri(entity, port, warn=True)
    File "/usr/local/lib/python3.7/site-packages/pymongo/uri_parser.py", line 318, in parse_uri
      raise ConfigurationError('The "dnspython" module must be '
  pymongo.errors.ConfigurationError: The "dnspython" module must be installed to use mongodb+srv:// URIs
  </code></pre>
  
  <p>It should successfully connect to the cluster from what I expect and also, just two points to specify</p>
  
  <ol>
  <li>I installed dnspython AFTER the error popped up.</li>
  <li>It seems the problem is similar to this <a href="https://stackoverflow.com/questions/52930341/pymongo-mongodbsrv-dnspython-must-be-installed-error">pymongo - mongodb+srv &quot;dnspython must be installed&quot; error</a> but I am NOT using Jupyter Notebook.</li>
  </ol>