InfluxDB: support non-ASCII symbols in sensor names. Fix for InfluxDB Cloud

This commit is contained in:
Maxim Strinzha 2023-03-19 16:10:01 +03:00
parent 03d1521c5e
commit c59931dfc1

View file

@ -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))