Skip to content
Snippets Groups Projects
Commit b2ef40c0 authored by Paulus Kruger's avatar Paulus Kruger
Browse files

string decode ignore errors

parent fe33b653
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment