From b2ef40c08d5b7f3aeb8add91665d8cf0175ca378 Mon Sep 17 00:00:00 2001
From: Paulus <kruger@astron.nl>
Date: Wed, 22 Sep 2021 08:18:35 +0100
Subject: [PATCH] string decode ignore errors

---
 opcuaserv/yamlreader.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opcuaserv/yamlreader.py b/opcuaserv/yamlreader.py
index fa5a456..7582906 100644
--- a/opcuaserv/yamlreader.py
+++ b/opcuaserv/yamlreader.py
@@ -184,7 +184,7 @@ class yamlreader(yamlconfig):
         elif dtype=="string": 
                 cnt=int(len(data)/width)
 #                data2=[(bytearray(data[i*width:(i+1)*width]).decode("utf-8")) for i in range(cnt)]
-                data2=[bytearray(data)[i*width:(i+1)*width].decode("utf-8") for i in range(cnt)]
+                data2=[bytearray(data)[i*width:(i+1)*width].decode("utf-8",errors='ignore') for i in range(cnt)]
         else:
                 logging.warn("OPCset unsupported type");
                 return;
-- 
GitLab