Getting error when querying a marginally longer running query
Make sure these boxes are checked before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if any
- [x] I have reproduced the issue with at least the latest released version of superset
- [x] I have checked the issue tracker for the same issue and I haven't found one similar
Superset Version - 0.17.2
When I am submitting a query to get data from redshift in Sql Lab :-
select "table",diststyle,sortkey1,empty,unsorted,sortkey1_enc,skew_sortkey1,skew_rows from svv_table_info;
I'm getting this error ::
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/superset/views/core.py", line 2046, in sql_json
data = sql_lab.get_sql_results(query_id, return_results=True)
File "/usr/local/lib/python2.7/dist-packages/celery/local.py", line 188, in __call__
return self._get_current_object()(*a, **kw)
File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 420, in __call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/superset/sql_lab.py", line 134, in get_sql_results
handle_error(db_engine_spec.extract_error_message(e))
File "/usr/local/lib/python2.7/dist-packages/superset/sql_lab.py", line 68, in handle_error
raise Exception(query.error_message)
Exception: 'utf8' codec can't decode byte 0xff in position 11: invalid start byte
whereas the same query works if I apply a LIMIT of 100. The total rows in the table is 485.
any solution yet. I am also experiencing the same problem...
I think the stack trace here isn't the stack trace we need to debug this. Maybe the stack trace is on the worker's logs?
Our DBA Solved this issue.
The problem was in json Encoding.
To fix you need to open JSON.py and change
json.dumps(data, default=utils.json_iso_dttm_ser,encoding="latin-1")
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.