From 8ee19a1355629aecc88c34d21098c7d062ea5292 Mon Sep 17 00:00:00 2001 From: tkl Date: Wed, 14 Aug 2019 14:22:45 +0000 Subject: [PATCH] Update 'mqtt_logger/__init__.py' --- mqtt_logger/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mqtt_logger/__init__.py b/mqtt_logger/__init__.py index 99e3721..34d9e00 100644 --- a/mqtt_logger/__init__.py +++ b/mqtt_logger/__init__.py @@ -35,7 +35,7 @@ def main(): if not os.path.isdir(logdir): os.makedirs(logdir) log = open(logfile, 'a') - log.write(msg.payload + '\n') + log.write(msg.payload.decode("utf-8") + '\n') log.close() except KeyboardInterrupt: logging.exception('Ececution interrupted by Keyboard Interrupt')