Strange behaviour of pymongo

Can you post the code here please. That would help.