Closed martinohanlon closed 7 years ago
Sounds like a bug in pyserial. Will keep it on the list.
Informed by this....
https://github.com/pyserial/pyserial/issues/86
I suspect you have an old python process running in another window, or more likely in an orphaned shell that is running in the background. The Raspberry Pi is notorious for leaving python programs running in the background if you accidentally click the X in the window at the wrong time. We often see this with our LED flashing program in our alarm system resource with the IET kits where kids click the X and then their LED is flashing in seemingly random patterns.
The way to diagnose this is to do this from another terminal prompt and see what other python processes are still running:
ps -ax | grep python
So, unfortunately, I think this might be classified as "user error"
@martinohanlon perhaps next time you see this you can run the above diagnostic and paste the results here so I can confirm this is the issue. Thanks
If this is the case, there is not much I can do to fix it. It might be possible to catch this exception in bitio though and display a helpful hint suggesting what the cause of the problem is (and the usual way to recover from it). But I need to confirm if this is actually what is causing the problem first by you re-testing, and then decide the course of action from there.
@martinohanlon Have you managed to try this again to prove or deny my hypothesis?
Well, I wrote the 'ball game' on the Pi and didnt receive the error, so lets consider this 'resolved'.
I did a little bit of testing on a Pi.
I received this error a couple of times (I wasnt able to recreate it consistently though, so not sure how much to worry about it):