Closed RobertoRoos closed 1 year ago
Had a look with @jhrutgers - this issue is specific to running the script from the PyCharm IDE. The PyCharm runner is adding something to the stdin, which is received and throws an error in the wrapper.
EDIT: This can also be avoided by checking "Emulate terminal in output console" the PyCharm run configuration.
We could improve the shutdown behavior in case of such an error, but just silently dropping Unicode errors as you propose in the PR, is not the solution. Apparently, there is something wrong with the I/O (hence the exception), but that should either be solved automatically, or lead to some proper error report with shutdown. As this seems to be an issue with the environment (PyCharm), I would suggest the latter.
Running the serial wrapper on Windows always causes an exception when trying to shut it down (sending a
KeyboardInterrupt
):The process always has to be killed in order to progress.
I'm running it as: