Guest User

Untitled

a guest
Aug 15th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. /usr/local/lib/python2.6/dist-packages/pymongo/message.pyc in insert(collection_name, docs, check_keys, safe, last_error_args)
  2. 65 data = __ZERO
  3. 66 data += bson._make_c_string(collection_name)
  4. ---> 67 bson_data = "".join([bson.BSON.encode(doc, check_keys) for doc in docs])
  5. 68 if not bson_data:
  6. 69 raise InvalidOperation("cannot do an empty bulk insert")
  7.  
  8. /usr/local/lib/python2.6/dist-packages/bson/__init__.pyc in encode(cls, document, check_keys)
  9. 460 .. versionadded:: 1.9
  10. 461 """
  11. --> 462 return cls(_dict_to_bson(document, check_keys))
  12. 463
  13. 464 def to_dict(self, as_class=dict, tz_aware=False):
  14.  
  15. InvalidDocument: Cannot encode object: datetime.date(2010, 10, 27)
Add Comment
Please, Sign In to add comment