From b7be96317fc71cf69452c90b83c7511cd0a3ac86 Mon Sep 17 00:00:00 2001 From: timifasubaa <30888507+timifasubaa@users.noreply.github.com> Date: Sat, 9 Dec 2017 14:23:24 -0800 Subject: [PATCH] resolve python2 str() issue (#4030) * make string conversion use utf8 * Update viz.py * make utf-8 consistent with other usages * Update viz.py * Update viz.py --- superset/viz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset/viz.py b/superset/viz.py index e3c17370264f7..0eeed238b6ffd 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -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 @@ -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,