I’m trying to save a python list to mongodb using pymongo, but the saved document has a null value instead of the list.
db.testcoll.save({"test" : [12345]})
results in
{ "_id" : ObjectId("50b53e7b71340f4ad774897a"), "test" : null }
A couple of other questions suggested using a dictionary instead, but dict values also result in null. Both array and dict values work fine when entered directly in the mongo client. Is this a known gap in the pymongo client?
Works well on my pymongo 2.2.1. That must have been an issue in the eariler pymongo releases. Try to upgrage it.