Jim Zhan
unread,Oct 17, 2009, 2:58:06 AM10/17/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/jim/test.py", line 319, in save
result = self.store.save(self.__dict__, safe=True)
File "build/bdist.linux-i686/egg/pymongo/collection.py", line 157,
in save
manipulate, safe)
File "build/bdist.linux-i686/egg/pymongo/collection.py", line 232,
in update
message += bson.BSON.from_dict(document)
File "build/bdist.linux-i686/egg/pymongo/bson.py", line 550, in
from_dict
return cls(_dict_to_bson(dict, check_keys))
InvalidDocument: Cannot encode object: datetime.date(2009, 10, 17)
But it works fine when using datetime.