MongoKit framework try to keep its simplicity when you manage mongodb in python. MongoKit was developed to be fast and light with KISS and DRY in mind. MongoKit brings structured schema and validation layer on top of the great pymongo driver. Discuss with us on Google group : http://groups.google.com/group/mongokit or follow the news on Twitter: http://twitter.com/namlook
Mongokit causes a weird issue when I have a document structure below. I think the issue started when I added 3 new fields which are key-value type dictionary.
I was able to insert a new record but when I tried to update the same object and call save(), I got an exception : InvalidDocument | Cannot encode object: {u'FillSize': 20, u'MinSize': 10}
The whole document is below if you want to check for its validity. I tested it using bson.BSON.encode(obj) and it works perfectly.
This error went away when I set 'use_dot_notation = False' It took me long time to figure out that this issues is not with the document but with its handling.
Mongokit causes a weird issue when I have a document structure below. I think the issue started when I added 3 new fields which are key-value type dictionary.
I was able to insert a new record but when I tried to update the same object and call save(), I got an exception :
InvalidDocument | Cannot encode object: {u'FillSize': 20, u'MinSize': 10}
The whole document is below if you want to check for its validity. I tested it using bson.BSON.encode(obj) and it works perfectly.
This error is with MongoKit 0.9.1.1
This error went away when I set
'use_dot_notation = False'
It took me long time to figure out that this issues is not with the document but with its handling.Related issue > https://stackoverflow.com/questions/22049076/mongokit-nested-structure-save-error/22078430#