Skip to content

Commit

Permalink
Fix: use 'ignore_nan' for dump_options (pyecharts#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
li-boxuan authored and chenjiandongx committed Jun 29, 2019
1 parent 6098c89 commit 01b0548
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyecharts/charts/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
import json
import simplejson as json
import os
import uuid

Expand Down Expand Up @@ -50,7 +50,7 @@ def get_options(self) -> dict:

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(
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
jinja2>=2.8
prettytable
simplejson
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__author_email__ = "[email protected]"
__license__ = "MIT"

__requires__ = ["jinja2", "prettytable"]
__requires__ = ["jinja2", "prettytable", "simplejson"]
__extra_requires__ = {
"selenium": ["snapshot-selenium"],
"phantomjs": ["snapshot-phantomjs"],
Expand Down

0 comments on commit 01b0548

Please sign in to comment.