title: Flask PyMongo connection error: Unknown option connect
body: <p>I am running flask app which connects to MongoDB hosted at mlab. Here is the code snippet. </p>
  
  <pre><code>from flask import Flask
  from flask_pymongo import PyMongo
  app = Flask(__name__)
  app.config['MONGO_DBNAME'] = 'my-db-name'
  app.config['MONGO_URI'] = 'mongodb://&lt;username&gt;:&lt;password&gt;@ds061474.mlab.com:61474/&lt;db-name&gt;'
  mongo = PyMongo(app)
  </code></pre>
  
  <p>When I run flask from terminal (after adding username:password and db name, I get follow error (screenshot below)[!:
  <code>pymongo.errors.ConfigurationError: Unknown option connect</code>
  <a href="https://i.stack.imgur.com/aNfyG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aNfyG.png" alt="enter image description here"></a></p>
  
  <p>I am running:</p>
  
  <pre><code>Flask: 1.0.2
  Flask-PyMongo: 2.2.0
  Python: 3.7.0
  </code></pre>
  
  <p>Can someone help?</p>