Closed modbw closed 5 years ago
Thanks for the bug report. I went through grabserial looking for unicode errors like the one you found, and changed quite a bit of code. Please see the latest version (1.9.8).
Can you please test this and see if the changes work in your windows environment?
Thanks, -- Tim
I believe I have fixed this. Thanks for the bug report. -- Tim On Thursday, August 16, 2018, 6:36:37 AM PDT, modbw notifications@github.com wrote:
Fixes the following error on windows for me when typeing commands in a running grabserial instance or by passing via -c
Traceback (most recent call last): File "tools/python/grabserial.py", line 530, in grab(sys.argv[1:]) File "tools/python/grabserial.py", line 415, in grab sd.write(cmdinput + "\n") File "c:\gsPython\lib\site-packages\pyserial-3.4-py3.6.egg\serial\serialwin32.py", line 308, in write data = to_bytes(data) File "c:\gsPython\lib\site-packages\pyserial-3.4-py3.6.egg\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: 'run bl\n'
You can view, comment on, or merge this pull request online at:
https://github.com/tbird20d/grabserial/pull/24
Commit Summary
File Changes
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Latest version from git works perfectly in my environment. Thanks a lot.
Fixes the following error on windows for me when typeing commands in a running grabserial instance or by passing via -c
Traceback (most recent call last): File "tools/python/grabserial.py", line 530, in
grab(sys.argv[1:])
File "tools/python/grabserial.py", line 415, in grab
sd.write(cmdinput + "\n")
File "c:\gsPython\lib\site-packages\pyserial-3.4-py3.6.egg\serial\serialwin32.py", line 308, in write
data = to_bytes(data)
File "c:\gsPython\lib\site-packages\pyserial-3.4-py3.6.egg\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: 'run bl\n'