From 213d753168cab897fa01971db859b51858c53701 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Tue, 30 May 2023 15:56:07 +0200 Subject: [PATCH] try decode base64 --- src/api_communication/api_communication/api_listener.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_communication/api_communication/api_listener.py b/src/api_communication/api_communication/api_listener.py index 5c8406e2..0d3d4a80 100644 --- a/src/api_communication/api_communication/api_listener.py +++ b/src/api_communication/api_communication/api_listener.py @@ -135,7 +135,7 @@ class ApiListener(Node): self.get_logger().info('Reading image') base64_img = base64.b64encode(f.read()) self.message_queue.append(json.dumps( - {'type': ResponseMessage.IMAGE.name, 'image': base64_img})) + {'type': ResponseMessage.IMAGE.name, 'image': base64_img.decode('utf-8')})) except Exception as e: self.get_logger().error('Something went wrong while sending a take picture request and waiting for the response: %r' % (e))