I’m trying to do this:
event = coll.find_one({"_id": {"$oid": event_id}})
Where event_id is the string from an ObjectId:
event_id='50bbd48eefbdd2a1e83bc440'
but the event ends up empty. I’m certain this is not how you find documents with the ObjectId’s in pymongo, but I have searched for a while and have not figured out how. Any help would be appreciated. Thanks!
You have to convert
event_idto anObjectIdlike this: