question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR:superset.sql_lab:Query 14: <class 'UnicodeDecodeError'>

See original GitHub issue

A clear and concise description of what the bug is.

Expected results

show content correctly in preview tab under SQL lab

Actual results

clickhouse error: ‘utf-8’ codec can’t decode byte 0xcc in position 69: invalid continuation byte

Screenshots

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

  1. add a SQLAlchemy URI of clickhouse in databases list with format mentioned in document ‘clickhouse://default@XXXXXXXX:8124/tutorial’ 2.choose a table with utf-8 character
  2. Preview tab show error ‘clickhouse error: ‘utf-8’ codec can’t decode byte 0xcc in position 69: invalid continuation byte’

Environment

(please complete the following information): deploy with docker

  • superset version: 0.37.2
  • python version: 3.7.9
  • node.js version: v4.2.6

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are 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.

Additional context

Add any other context about the problem here.

Log in container

Triggering query_id: 17 INFO:superset.views.core:Triggering query_id: 17 timeout can’t be used in the current context WARNING:superset.utils.core:timeout can’t be used in the current context signal only works in main thread Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/superset/utils/core.py”, line 624, in enter signal.signal(signal.SIGALRM, self.handle_timeout) File “/usr/local/lib/python3.6/signal.py”, line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread ERROR:superset.utils.core:signal only works in main thread Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/superset/utils/core.py”, line 624, in enter signal.signal(signal.SIGALRM, self.handle_timeout) File “/usr/local/lib/python3.6/signal.py”, line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread SQLite Database support for metadata databases will be removed in a future version of Superset. WARNING:superset.sql_lab:SQLite Database support for metadata databases will be removed in a future version of Superset. Query 17: Executing 1 statement(s) INFO:superset.sql_lab:Query 17: Executing 1 statement(s) Query 17: Set query to ‘running’ INFO:superset.sql_lab:Query 17: Set query to ‘running’ DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.100.47:8124 DEBUG:urllib3.connectionpool:http://192.168.100.47:8124 “POST /?user=default HTTP/1.1” 200 None DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.100.47:8124 DEBUG:urllib3.connectionpool:http://192.168.100.47:8124 “POST /?database=tutorial&user=default HTTP/1.1” 200 None DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.100.47:8124 DEBUG:urllib3.connectionpool:http://192.168.100.47:8124 “POST /?database=tutorial&user=default HTTP/1.1” 200 None Query 17: Running statement 1 out of 1 INFO:superset.sql_lab:Query 17: Running statement 1 out of 1 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.100.47:8124 DEBUG:urllib3.connectionpool:http://192.168.100.47:8124 “POST /?query_id=47f0c45e-2e2a-11eb-a7a5-0242ac110002&database=tutorial&user=default HTTP/1.1” 200 None Query 17: <class ‘UnicodeDecodeError’> ERROR:superset.sql_lab:Query 17: <class ‘UnicodeDecodeError’>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
zhaoyongjiecommented, Nov 24, 2020

@yahwang try setting engine_params to UTF-8

DATA -> DATABASES -> select clickhouse instance. editing Extra

{
    "metadata_params": {},
    "engine_params": {"encoding": "UTF-8"},
    "metadata_cache_timeout": {},
    "schemas_allowed_for_csv_upload": []
}
1reaction
issue-label-bot[bot]commented, Nov 24, 2020

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.81. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR:superset.sql_lab:Query 14: <class ... - GitHub
A clear and concise description of what the bug is. Expected results. show content correctly in preview tab under SQL lab. Actual results....
Read more >
Issue Code Reference - Apache Superset
This page lists issue codes that may be displayed in Superset and provides ... Your query failed because of an error that occurred...
Read more >
Python | Programmatic Ponderings | Page 2
The SQL dataset contains a SQL query, which is executed against the data store. According to the documentation, both Amazon Athena and Amazon...
Read more >
Superset BigQuery Issue1011 (Unexpected param: (2022 ...
Unexpected param: (2022) This may be triggered by: Issue 1011 - Superset encountered an unexpected error. In SQL lab when I run the...
Read more >
Python Crash Course - Department of Computer Science
Introduction to Python. 10. Functions as objects. 19. Linear programming. 2. Python basics / if. 11. Object oriented programming 20.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found