-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
RuntimeError when trying to call input
inside key_press_event.
#10061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you are doing this in a terminal, you are using Sorry this is a very rambling answer. |
Thanks a lot for the response. I figured that it would be something along the lines that you described but it is good to know the details. Do you have any suggestions how to circumvent the issue? The only thing that I could come up with is to temporarily disconnect |
AFAICS there's no simple solution. In any case, this is not actionable from the Matplotlib side. |
Bug report
Bug summary
Calling
input
inside akey_press_event
results either in a RuntimeError or causes the terminal and canvas to freeze. Presumably, this is because the input toinput
triggers furtheron_key_press
calls (although this issue also appears to happen when the figure is not in focus so I am actually not sure if that is the reason). I am looking for a work around.Code for reproduction
Actual outcome
Expected outcome
The expected outcome can be simulated by commenting out the input call and uncommenting the
ans = 'foo'
line in the MWE.Matplotlib version
print(matplotlib.get_backend())
): TkAggInstalled everything via pip.
The text was updated successfully, but these errors were encountered: