Hello everyone
I'm using python 3.1 and am trying to use the pyserial library.
However, when I try something like ser.write('hello'), I get a type error.
>>> import serial
>>> ser = serial.Serial('COM13')
>>> ser.write('a')
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
ser.write('a')
File "C:\Program Files\Python31\lib\site-packages\serial\serialwin32.py", line 249, in write
data = bytes(data)
TypeError: string argument without an encoding
how do I fix this? And is it normal to get this error? Most tutorials use the same format for the commands and don't get any error.