My python try/except loop does not seem to trigger a keyboard interrupt when Ctrl + C is pressed while debugging my code in pycharm. My code look like this:
try:
while loop:
print("busy")
except KeyboardInterrupt:
exit()
EDIT: There seems to be some problems with my slimmed down code working and not producing the same error. The full code can be viewed here. I have also re-slimed down the code (The code above) and it has produced the same error.
I know this is an old question, but I ran into the same problem and think there's an easier solution:
In PyCharm go to "Run"/"Edit Configurations" and check "Emulate terminal in output console". PyCharm now accepts keyboard interrupts (make sure the console is focused).
Tested on: PyCharm 2019.1 (Community Edition)