Open MiraToutounji opened 6 years ago
Hi @MiraToutounji
This sounds like the same problem from https://github.com/boppreh/keyboard/issues/64 . The problem is that the code is busy waiting, which is technically legal but should be avoided. That other issue has been fixed, and I'm now trying to reproduce the error in this case.
As a workaround, I suggest using "add_hotkey". Let me know if you need help converting this code to avoid busy-waiting.
I'll leave the issue open while I try to reproduce and fix the error.
I think I've fixed the RuntimeError in the suppress
branch. If somebody could test, I'd be very grateful.
Thanks for the update! I'm still getting the same error.
):
Issue #64 has been fixed, and I can't reproduce your issue. Could you include a minimal test case (without the zebra library), or at least a stack trace to help debug the issue?
Also note that in the meantime the fix has been released in v0.13.1.
Error seems to have been fixed when upgrading to the latest version for a script I was running.
The code runs properly when I just had the if "keyboard.is_pressed('y')==1:" but when I added the break command to exit the loop when n is pressed, I received an error pointing to the "if keyboard.is_pressed('y')==1:" line.
Here's my code