When reading the first Byte in the ByteArray, which contains the maximum length of the string, the Hexadecimal value is sometimes in a format that Python will not cast to Integer : b'\ff' will stay the type "Bytes" and the slice access fails.
this Section in set_string
# fill the rest with empty space
for r in range(i + 1, (bytearray_[byte_index]) - 2):
bytearray_[byte_index + 2 + r] = ord(' ')
When reading the first Byte in the ByteArray, which contains the maximum length of the string, the Hexadecimal value is sometimes in a format that Python will not cast to Integer : b'\ff' will stay the type "Bytes" and the slice access fails.
this Section in set_string
this Section in get_string
The solution i came up is to evaluate the value using ord :