From c59931dfc1ad291e582c3a7de634550592e60d98 Mon Sep 17 00:00:00 2001 From: Maxim Strinzha Date: Sun, 19 Mar 2023 16:10:01 +0300 Subject: [PATCH] InfluxDB: support non-ASCII symbols in sensor names. Fix for InfluxDB Cloud --- cbpi/controller/log_file_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cbpi/controller/log_file_controller.py b/cbpi/controller/log_file_controller.py index 6c69c9d..59da525 100644 --- a/cbpi/controller/log_file_controller.py +++ b/cbpi/controller/log_file_controller.py @@ -69,7 +69,7 @@ class LogController: try: header = {'User-Agent': name, 'Authorization': "Token {}".format(self.influxdbpwd)} http = urllib3.PoolManager() - req = http.request('POST',self.influxdburl, body=out, headers = header) + req = http.request('POST',self.influxdburl, body=out.encode(), headers = header) except Exception as e: logging.error("InfluxDB cloud write Error: {}".format(e))