severb/graypy — Issue #6: graypy crashing when passed a django WSGIRequest
Author: severb
Created: 2012-01-30 17:59:15+00:00
State: open

stelios reported that

When django throws an error 500 graypy throws TypeError when doing
json.dumps.
Here's (part of) the stacktrace:
```
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/handlers.py", line 541, in emit
s = self.makePickle(record)
File "/usr/local/lib/python2.6/dist-packages/graypy/handler.py",
line 28, in makePickle
return zlib.compress(json.dumps(message_dict))
File "/usr/lib/python2.6/json/__init__.py", line 230, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python2.6/json/encoder.py", line 367, in encode
chunks = list(self.iterencode(o))
File "/usr/lib/python2.6/json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "/usr/lib/python2.6/json/encoder.py", line 275, in
_iterencode_dict
for chunk in self._iterencode(value, markers):
File "/usr/lib/python2.6/json/encoder.py", line 317, in _iterencode
for chunk in self._iterencode_default(o, markers):
File "/usr/lib/python2.6/json/encoder.py", line 323, in
_iterencode_default
newobj = self.default(o)
File "/usr/lib/python2.6/json/encoder.py", line 344, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: