Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

JSON encoding fails to handle Django lazy objects #180

@acdha

Description

@acdha

I've had a few errors which were not reported because Raven failed to JSON encode the data:

  File "/opt/mysite/.virtualenv/lib/python2.6/site-packages/simplejson/encoder.py", line 311, in iterencode
    return _iterencode(o, 0)
  File "/opt/mysite/.virtualenv/lib/python2.6/site-packages/raven/utils/json.py", line 22, in default
    return super(BetterJSONEncoder, self).default(obj)
  File "/opt/mysite/.virtualenv/lib/python2.6/site-packages/simplejson/encoder.py", line 213, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <django.utils.functional.__proxy__ object at 0x7fec99bd4110> is not JSON serializable

I'll try to get a debugger going to see exactly what the object in question is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions