From 074d54bd18851f54fd15295c0d1c3ca5b406ee88 Mon Sep 17 00:00:00 2001 From: Nick Hagerty Date: Thu, 5 Dec 2024 09:58:17 -0500 Subject: [PATCH] Updated InfluxDB send_message to use UTF-8 encoding for all messages --- .../libraries/rgt_database_loggers/db_backends/rgt_influxdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harness/libraries/rgt_database_loggers/db_backends/rgt_influxdb.py b/harness/libraries/rgt_database_loggers/db_backends/rgt_influxdb.py index adb725e..cfc5328 100644 --- a/harness/libraries/rgt_database_loggers/db_backends/rgt_influxdb.py +++ b/harness/libraries/rgt_database_loggers/db_backends/rgt_influxdb.py @@ -482,7 +482,7 @@ def _send_message(self, full_url : str, message : str, headers : dict): self.__logger.doDebugLogging(f"Sending message to InfluxDB: {message}") # We do not catch the exception here -- it will be caught in the database manager class - r = requests.post(full_url, data=message, headers=headers) + r = requests.post(full_url, data=message.encode('utf-8'), headers=headers) if r.status_code == 200 or r.status_code == 204: self.__logger.doDebugLogging(f"Logged to InfluxDB successfully ({r.status_code}, {r.reason}): {message}")