Closed gjmvervoort closed 4 years ago
Hello @gjmvervoort Thanks for this fix
@fdev can you merge this to master ? Thanks
Thank you @gjmvervoort for the pull request and fixing the code for Python 3.7. My apologies I could not get around to merging your code sooner. :pray:
[gert@mars bc125csv]$ echo -en "PRG\nBLT,AO\nEPG" | bc125csv shell Traceback (most recent call last): File "/usr/local/bin/bc125csv", line 11, in
load_entry_point('bc125csv==1.0.1', 'console_scripts', 'bc125csv')()
File "/usr/local/lib/python3.7/site-packages/bc125csv-1.0.1-py3.7.egg/bc125csv/handler.py", line 386, in main
File "/usr/local/lib/python3.7/site-packages/bc125csv-1.0.1-py3.7.egg/bc125csv/handler.py", line 182, in handle
File "/usr/local/lib/python3.7/site-packages/bc125csv-1.0.1-py3.7.egg/bc125csv/handler.py", line 286, in command_shell
File "/usr/local/lib/python3.7/site-packages/bc125csv-1.0.1-py3.7.egg/bc125csv/handler.py", line 220, in get_scanner
File "/usr/local/lib/python3.7/site-packages/bc125csv-1.0.1-py3.7.egg/bc125csv/scanner.py", line 149, in get_model
File "/usr/local/lib/python3.7/site-packages/bc125csv-1.0.1-py3.7.egg/bc125csv/scanner.py", line 120, in send
File "/usr/local/lib/python3.7/site-packages/bc125csv-1.0.1-py3.7.egg/bc125csv/scanner.py", line 115, in writeread
File "/usr/lib/python3.7/site-packages/serial/serialposix.py", line 532, in write
d = to_bytes(data)
File "/usr/lib/python3.7/site-packages/serial/serialutil.py", line 63, in to_bytes
raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
TypeError: unicode strings are not supported, please encode to bytes: 'MDL\r'
[gert@mars bc125csv]$