Skip to content

Commit fd1a481

Browse files
committed
Fixed PicoScope 2206B serial null termination conversion error
1 parent 41e0f39 commit fd1a481

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

picoscope/ps2000a.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def __init__(self, serialNumber=None, connect=True):
146146
def _lowLevelOpenUnit(self, sn):
147147
c_handle = c_int16()
148148
if sn is not None:
149-
serialNullTermStr = byref(create_string_buffer(sn))
149+
serialNullTermStr = create_string_buffer(bytes(sn, encoding='utf-8'))
150150
else:
151151
serialNullTermStr = None
152152
# Passing None is the same as passing NULL

0 commit comments

Comments
 (0)