From d4534d6045b24838418e12ff1bb81b5fabab7b24 Mon Sep 17 00:00:00 2001 From: "Jayke.Lin" Date: Mon, 12 Dec 2016 11:05:16 +0800 Subject: [PATCH] Using UTF-8 encoding for clickhouse POST data --- redash/query_runner/clickhouse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redash/query_runner/clickhouse.py b/redash/query_runner/clickhouse.py index 9574a6f202..9bc8b3f424 100644 --- a/redash/query_runner/clickhouse.py +++ b/redash/query_runner/clickhouse.py @@ -62,7 +62,7 @@ def _get_tables(self, schema): return schema.values() def _send_query(self, data, stream=False): - r = requests.post(self.configuration['url'], data=data, stream=stream, params={ + r = requests.post(self.configuration['url'], data=data.encode("utf-8"), stream=stream, params={ 'user': self.configuration['user'], 'password': self.configuration['password'], 'database': self.configuration['dbname'] })