#250 Cannot JSON encode certain contacts due to TypeErrro

0.49
closed
Protocol
General-Bug
2016-07-14
2014-07-09
No

Cannot JSON encode certain contacts

2014-07-09 15:42:58,042 7267 http 
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc87-py2.6.egg/coils/net/http_handler.py", line 211, in process_request
    getattr(handler, 'do_{0}'.format(self.command))()
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc87-py2.6.egg/coils/net/foundation/davobject.py", line 339, in do_GET
    payload = self.get_representation()
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc87-py2.6.egg/coils/net/foundation/davobject.py", line 282, in get_representation
    self._representation = json_encode(omphalos)
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc87-py2.6.egg/coils/net/foundation/json_encode.py", line 31, in json_encode
    return json.dumps(data, default=_encode, )
  File "/usr/lib64/python2.6/json/__init__.py", line 237, in dumps
    **kw).encode(obj)
  File "/usr/lib64/python2.6/json/encoder.py", line 367, in encode
    chunks = list(self.iterencode(o))
  File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode
    for chunk in self._iterencode_dict(o, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict
    for chunk in self._iterencode(value, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 306, in _iterencode
    for chunk in self._iterencode_list(o, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 204, in _iterencode_list
    for chunk in self._iterencode(value, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode
    for chunk in self._iterencode_dict(o, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict
    for chunk in self._iterencode(value, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 317, in _iterencode
    for chunk in self._iterencode_default(o, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 323, in _iterencode_default
    newobj = self.default(o)
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc87-py2.6.egg/coils/net/foundation/json_encode.py", line 29, in _encode
    raise TypeError()
TypeError

Discussion

  • Adam Tauno Williams

    • status: accepted --> closed
     
  • Adam Tauno Williams

    resolved for 0.1.49rc88, json_encode from coils.net can now serialize date values.

     
  • Adam Tauno Williams

    • Layer: --> Protocol
    • Type: --> General-Bug
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks