pyserial 3.0 and pymata-aio
When pip installing pymata-aio, the latest version of pyserial is also installed.
pymata-aio was developed and tested using pyserial 2.7. The latest version of pyserial is now version 3.0. This latest release of pyserial changed the writeTimeout parameter to write_timeout, resulting in an exception to be thrown as shown below.
Here is a simple example based on using the pyserial 2.7 api:
import serial
my_serial = serial.Serial('/dev/ttyACM0', 57500, timeout=1, writeTimeout=1)
And here is output when using pyserial 3.0:
$ python3 sertest.py
Traceback (most recent call last):
File "sertest.py", line 3, in
my_serial = serial.Serial('/dev/ttyACM0', 57500, timeout=1, writeTimeout=1)
TypeError: __init__() got an unexpected keyword argument 'writeTimeout'
I am working with the pyserial author to resolve the issue. If you are seeing this error, you can force pyserial 2.7 to be loaded using the following pip command:
pip install pyserial==2.7
No comments:
Post a Comment