-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
前端渲染 k线图,bar图,地图,饼图,无法渲染,只有词云可以渲染 #19
Comments
pip freeze 请给出你的版本信息 |
解决了 pyecharts 的版本降级到0.4.0 astroid==1.6.3 |
0.5.3 应该也可以的 |
django-echarts 目前(最新 v0.3.x) 还不支持 pyecharts v0.5.x 。 参考: #18 |
请参照我的解决方案试试 |
这里时Django报错信息
[13/May/2018 16:39:03] "GET /options/simpleKLine/ HTTP/1.1" 500 17958
Internal Server Error: /options/simpleBar/
Traceback (most recent call last):
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/handlers/base.py", line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/views/generic/base.py", line 89, in dispatch
return handler(request, *args, **kwargs)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django_echarts/views/frontend.py", line 12, in get
return JsonResponse(data=echarts_instance.options, safe=False)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/http/response.py", line 509, in init
data = json.dumps(data, cls=encoder, **json_dumps_params)
File "/usr/lib/python3.5/json/init.py", line 237, in dumps
**kw).encode(obj)
File "/usr/lib/python3.5/json/encoder.py", line 198, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.5/json/encoder.py", line 256, in iterencode
return _iterencode(o, 0)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/serializers/json.py", line 104, in default
return super().default(o)
File "/usr/lib/python3.5/json/encoder.py", line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <pyecharts.echarts.label.NormalLabel object at 0x7f183e0ece10> is not JSON serializable
ERROR:django.request:Internal Server Error: /options/simpleBar/
Traceback (most recent call last):
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/handlers/base.py", line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/views/generic/base.py", line 89, in dispatch
return handler(request, *args, **kwargs)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django_echarts/views/frontend.py", line 12, in get
return JsonResponse(data=echarts_instance.options, safe=False)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/http/response.py", line 509, in init
data = json.dumps(data, cls=encoder, **json_dumps_params)
File "/usr/lib/python3.5/json/init.py", line 237, in dumps
**kw).encode(obj)
File "/usr/lib/python3.5/json/encoder.py", line 198, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.5/json/encoder.py", line 256, in iterencode
return _iterencode(o, 0)
File "/home/tqw233/cycle/data/django-chartit/chart/lib/python3.5/site-packages/django/core/serializers/json.py", line 104, in default
return super().default(o)
File "/usr/lib/python3.5/json/encoder.py", line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <pyecharts.echarts.label.NormalLabel object at 0x7f183e0ece10> is not JSON serializable
The text was updated successfully, but these errors were encountered: