From 829f4fd58d2f13c7bec0e35335c6121f87d86268 Mon Sep 17 00:00:00 2001 From: Aigars Mahinovs Date: Tue, 19 Sep 2023 15:21:22 +0200 Subject: [PATCH] Fix string passing to c_char_p for Python3 --- dlt/dlt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlt/dlt.py b/dlt/dlt.py index dc41d78..782944b 100644 --- a/dlt/dlt.py +++ b/dlt/dlt.py @@ -1019,7 +1019,7 @@ def read_message(self, verbose=False): if msg.standardheader.htyp & DLT_HTYP_WEID: dltlib.dlt_set_storageheader(msg.p_storageheader, msg.headerextra.ecu) else: - dltlib.dlt_set_storageheader(msg.p_storageheader, ctypes.c_char_p("")) + dltlib.dlt_set_storageheader(msg.p_storageheader, ctypes.c_char_p(b"")) return msg @@ -1038,7 +1038,7 @@ def msg_callback(msg, data): # pylint: disable=no-self-argument if msg.contents.p_standardheader.contents.htyp & DLT_HTYP_WEID: dltlib.dlt_set_storageheader(msg.contents.p_storageheader, msg.contents.headerextra.ecu) else: - dltlib.dlt_set_storageheader(msg.contents.p_storageheader, ctypes.c_char_p("")) + dltlib.dlt_set_storageheader(msg.contents.p_storageheader, ctypes.c_char_p(b"")) print(msg.contents) return 0