You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
精确定位后发现,是字段数据类型为time时候就会报错.
日志显示入下
[2018-07-31 11:36:51,927][MainThread:140477748217600][task_id:default][exception_logging_middleware.py:10] [ERROR]- Traceback (most recent call l
ast):
File "/data/archer/sql/extend_json_encoder.py", line 52, in default
return convert(obj)
File "/data/venv4archer/lib/python3.6/functools.py", line 803, in wrapper
return dispatch(args[0].class)(*args, **kw)
File "/data/archer/sql/extend_json_encoder.py", line 26, in convert
raise TypeError('can not convert type')
TypeError: can not convert type
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/venv4archer/lib/python3.6/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/data/venv4archer/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/data/archer/sql/query.py", line 724, in query
return HttpResponse(json.dumps(finalResult, cls=ExtendJSONEncoder, bigint_as_string=True),
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/init.py", line 399, in dumps
**kw).encode(obj)
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/encoder.py", line 286, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/encoder.py", line 368, in iterencode
return _iterencode(o, 0)
File "/data/archer/sql/extend_json_encoder.py", line 54, in default
return super(ExtendJSONEncoder, self).default(obj)
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/encoder.py", line 263, in default
o.class.name)
TypeError: Object of type timedelta is not JSON serializable
The text was updated successfully, but these errors were encountered:
在线查询数据功能,如果查询select * from table 时候报如下错误.
精确定位后发现,是字段数据类型为time时候就会报错.
日志显示入下
[2018-07-31 11:36:51,927][MainThread:140477748217600][task_id:default][exception_logging_middleware.py:10] [ERROR]- Traceback (most recent call l
ast):
File "/data/archer/sql/extend_json_encoder.py", line 52, in default
return convert(obj)
File "/data/venv4archer/lib/python3.6/functools.py", line 803, in wrapper
return dispatch(args[0].class)(*args, **kw)
File "/data/archer/sql/extend_json_encoder.py", line 26, in convert
raise TypeError('can not convert type')
TypeError: can not convert type
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/venv4archer/lib/python3.6/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/data/venv4archer/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/data/archer/sql/query.py", line 724, in query
return HttpResponse(json.dumps(finalResult, cls=ExtendJSONEncoder, bigint_as_string=True),
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/init.py", line 399, in dumps
**kw).encode(obj)
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/encoder.py", line 286, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/encoder.py", line 368, in iterencode
return _iterencode(o, 0)
File "/data/archer/sql/extend_json_encoder.py", line 54, in default
return super(ExtendJSONEncoder, self).default(obj)
File "/data/venv4archer/lib/python3.6/site-packages/simplejson/encoder.py", line 263, in default
o.class.name)
TypeError: Object of type timedelta is not JSON serializable
The text was updated successfully, but these errors were encountered: