-
Notifications
You must be signed in to change notification settings - Fork 132
Insert to collection fails when using dot notation and pymongo c extensions #173
Comments
thanks a lot for your analysis of this issue. I can confirm that we are also impacted by this issue, and that the following workarounds temporarily solve this issue: |
@hmenager good advice! |
+1, very annoying bug |
I can just quickly confirm that Linux (Ubuntu 12.04) is also affected by this issue. The workaround mentioned above works here as well, pymongo 2.6.3 does not have this issue. |
I've got fix for this problem with #179 or you can use my master branch which also contains some other fixes for i18n That's real bug, but it caused by bug in MongoKit not pymongo. |
I merged the patch from last-g that fix #179. Please, can you test the HEAD ? If everything is all right, I'll release a new version. |
I can confirm pymongo 2.7.1 fixes this with mongokit 0.9.1.1 |
MongoKit documents with nested structure elements and dot notation activated fail to save when pymongo c extensions are present.
I think that there's a difference the pymongo C and Python code paths, with the C codepaths failing to recognise mongokit's "DotedDict" as a dictionary.
One instance of the problem is most likely in the bson package's function "_write_element_to_buffer" in "_cbsonmodule.c".
The code runs without issue after deleting "site-packages/pymongo/_cmessage.so" and "site-packages/bson/_cbson.so".
I realise that this is possibly a pymongo bug rather than a mongokit bug, but perhaps there's something to be done in mongokit to mitigate this while the bug is fixed upstream (if it is considered a bug.)
With pymongo c extensions:
The text was updated successfully, but these errors were encountered: