I need to search an ObjectId with python using pymongo but I always get an error. import pymongo from pymongo import MongoClient from pymongo import ObjectId gate = collection.find({'_id': ObjectId(modem["dis_imei"])}) Any ideas how to search? Continue reading...