I\'ve been stuck with diagnosing this for a few hours now and thought I\'d see if any pymongo experts out there have any ideas:
The following line of code:
The solution to this problem was not good news for pip: I had to uninstall pymongo and bson, then reinstall bson, then pymongo. So it looks like the order of installation is actually important!