我在 django 中收到此错误。我怎样才能更好地查看有问题的数据并删除它?或者 JSON 可序列化的类似类型是什么?
这个错误是突然出现的,我的网站正在运行,现在由于这个错误而无法加载。
Traceback:
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response
100. response = callback(request, *callback_args, **callback_kwargs)
File "/var/www/site/instance/src/server/site/site_core/views.py" in os_show
1193. return json_result(result)
File "/var/www/site/instance/src/server/site/../site/includes/jsonutils.py" in json_result
25. return HttpResponse(serialize(result, ensure_ascii=True))
File "/var/www/site/instance/src/server/site/../site/includes/jsonutils.py" in serialize
10. return json.dumps(object)
File "/usr/lib64/python2.4/site-packages/simplejson/__init__.py" in dumps
230. return _default_encoder.encode(obj)
File "/usr/lib64/python2.4/site-packages/simplejson/encoder.py" in encode
200. chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib64/python2.4/site-packages/simplejson/encoder.py" in iterencode
260. return _iterencode(o, 0)
File "/usr/lib64/python2.4/site-packages/simplejson/encoder.py" in default
177. raise TypeError(repr(o) + " is not JSON serializable")
Exception Type: TypeError at /os/show/1/
Exception Value: array([ 0.63266369]) is not JSON serializable