Fix: use 'ignore_nan' for dump_options (#1216)

This commit is contained in:
Boxuan Li 2019-06-29 15:13:55 +08:00 committed by 陈键冬
parent 6098c897b2
commit 01b0548935
3 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import datetime
import json
import simplejson as json
import os
import uuid
@ -50,7 +50,7 @@ class Base:
def dump_options(self) -> str:
return utils.replace_placeholder(
json.dumps(self.get_options(), indent=4, default=default)
json.dumps(self.get_options(), indent=4, default=default, ignore_nan=True)
)
def render(

View File

@ -1,2 +1,3 @@
jinja2>=2.8
prettytable
simplejson

View File

@ -14,7 +14,7 @@ __url__ = "https://github.com/pyecharts/pyecharts"
__author_email__ = "chenjiandongx@qq.com"
__license__ = "MIT"
__requires__ = ["jinja2", "prettytable"]
__requires__ = ["jinja2", "prettytable", "simplejson"]
__extra_requires__ = {
"selenium": ["snapshot-selenium"],
"phantomjs": ["snapshot-phantomjs"],