Skip to content

Commit

Permalink
resolve python2 str() issue (apache#4030)
Browse files Browse the repository at this point in the history
* make string conversion use utf8

* Update viz.py

* make utf-8 consistent with other usages

* Update viz.py

* Update viz.py
  • Loading branch information
timifasubaa authored and michellethomas committed May 23, 2018
1 parent 141508f commit b7be963
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import pandas as pd
from pandas.tseries.frequencies import to_offset
import simplejson as json
from six import PY3, string_types
from six import PY3, string_types, text_type
from six.moves import reduce

from superset import app, cache, get_manifest_file, utils
Expand Down Expand Up @@ -1300,9 +1300,9 @@ def get_data(self, df):
for i, v in ys.iteritems():
x = i
if isinstance(x, (tuple, list)):
x = ', '.join([str(s) for s in x])
x = ', '.join([text_type(s) for s in x])
else:
x = str(x)
x = text_type(x)
values.append({
'x': x,
'y': v,
Expand Down

0 comments on commit b7be963

Please sign in to comment.