title: Error getting MongoDB by _Id in Flask
body: <p>I can query my MongoDB and I see the "_id" value like this:</p>
  
  <pre><code>"_id" : BinData(3,"sFgVQWMKzUiWl5dql62j2g==")
  </code></pre>
  
  <p>Using Flask 0.10.1 and PyMongo 3.0.3 I attempt to "find_one" like this:</p>
  
  <pre><code>record = db.collection.find_one({'_id': ObjectId("sFgVQWMKzUiWl5dql62j2g==")})
  </code></pre>
  
  <p>And I get this error:</p>
  
  <pre><code>bson.errors.InvalidId: 'sFgVQWMKzUiWl5dql62j2g==' is not a valid ObjectId, it must be a 12-byte input or a 24-character hex string
  </code></pre>
  
  <p>Any help would be appreciated.</p>