File "/usr/local/lib/python2.7/site-packages/serial/serialutil.py", line 76, in to_bytes
b.append(item) # this one handles int and str for our emulation and ints for Python 3.x
TypeError: an integer or string of size 1 is required
Fix this by explicitly encoding text to UTF-8 format as shown below where ever applicable -
self.write(text.encode("utf-8"), timeout=15, writeTerm=chr(26))
Hey!
I've fixed this inside recently updated fork by babca@8f80ae9 and babca@09065e6 and added unit tests using UTF-8 characters :slightly_smiling_face:
File "/usr/local/lib/python2.7/site-packages/serial/serialutil.py", line 76, in to_bytes b.append(item) # this one handles int and str for our emulation and ints for Python 3.x TypeError: an integer or string of size 1 is required
Fix this by explicitly encoding text to UTF-8 format as shown below where ever applicable - self.write(text.encode("utf-8"), timeout=15, writeTerm=chr(26))