From 8ac56dfbfd24dde894a4685b78f392f3cdd24a16 Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 27 Apr 2019 00:11:52 +0100 Subject: [PATCH] send_line accepts str instead of bytes --- Houdini/Spheniscidae.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Houdini/Spheniscidae.py b/Houdini/Spheniscidae.py index 61ae754..a312dc7 100644 --- a/Houdini/Spheniscidae.py +++ b/Houdini/Spheniscidae.py @@ -69,11 +69,11 @@ class Spheniscidae: sub_element_parent = sub_element_object xml_data = tostring(data_root) - await self.send_line(xml_data) + await self.send_line(xml_data.decode('utf-8')) async def send_line(self, data): self.logger.debug('Outgoing data: %s', data) - self.__writer.write(data.encode() + Spheniscidae.Delimiter) + self.__writer.write(data.encode('utf-8') + Spheniscidae.Delimiter) async def close(self): self.__writer.close()