title: search by ObjectId in mongodb with pymongo
body: <p>I need to search an ObjectId with python using pymongo but I always get this error. Any ideas how to search? </p>
  
  <pre><code>import pymongo
  from pymongo import MongoClient
  from pymongo import ObjectId
  
  gate = collection.find({'_id': ObjectId(modem["dis_imei"])})
  print gate
  
      Traceback (most recent call last):
    File "C:\Users\gerswin\Documents\Proyectos\Demonio py\test.py", line 2, in &lt;module&gt;
      import pymongo
    File "C:\Python27\lib\site-packages\pymongo\__init__.py", line 80, in &lt;module&gt;
      from pymongo.connection import Connection
    File "C:\Python27\lib\site-packages\pymongo\connection.py", line 39, in &lt;module&gt;
      from pymongo.mongo_client import MongoClient
    File "C:\Python27\lib\site-packages\pymongo\mongo_client.py", line 45, in &lt;module&gt;
      from pymongo import (auth,
    File "C:\Python27\lib\site-packages\pymongo\database.py", line 22, in &lt;module&gt;
      from pymongo.collection import Collection
    File "C:\Python27\lib\site-packages\pymongo\collection.py", line 25, in &lt;module&gt;
      from pymongo.cursor import Cursor
    File "C:\Python27\lib\site-packages\pymongo\cursor.py", line 19, in &lt;module&gt;
      from bson import RE_TYPE
  ImportError: cannot import name RE_TYPE
  </code></pre>