superset: Dashboard filter error - 'ascii' codec can't encode character
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if any
- I have reproduced the issue with at least the latest released version of superset
- I have checked the issue tracker for the same issue and I haven’t found one similar
Superset version
{“GIT_SHA”: “”, “version”: “0.17.2”}
Expected results
Filtering the table without errors
Actual results
'ascii' codec can't encode character u'\u0406' in position 1512: ordinal not in range(128)
in terminal
2017-03-31 13:40:17,476:ERROR:root:'ascii' codec can't encode character u'\u0406' in position 1512: ordinal not in range(128)
Traceback (most recent call last):
File "/data/work/virtualenvs/superset/lib/python2.7/site-packages/superset/viz.py", line 234, in get_payload
df = self.get_df()
File "/data/work/virtualenvs/superset/lib/python2.7/site-packages/superset/viz.py", line 78, in get_df
self.results = self.datasource.query(query_obj)
File "/data/work/virtualenvs/superset/lib/python2.7/site-packages/superset/connectors/sqla/models.py", line 536, in query
sql = self.get_query_str(**query_obj)
File "/data/work/virtualenvs/superset/lib/python2.7/site-packages/superset/connectors/sqla/models.py", line 318, in get_query_str
compile_kwargs={"literal_binds": True}
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0406' in position 1512: ordinal not in range(128)
2017-03-31 13:40:17,479:INFO:root:Caching for the next 86400 seconds
Steps to reproduce

After selecting a filter

Thank you
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (7 by maintainers)
This should fix the issue and doesn’t break tests here:
If this is a mysql query try appending
?charset=utf8to your SQLAlchemy URI