Skip to content
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

"RuntimeError: Cannot change input buffer during execution" in console_widget.py #500

Closed
mspacek opened this issue Jun 2, 2011 · 1 comment
Milestone

Comments

@mspacek
Copy link
Contributor

mspacek commented Jun 2, 2011

Not sure what the sequence of events is, and I can't reproduce it reliably, but I've had this happen several times with ipython-qtconsole.

I type something, maybe a function name (say gca()), the call tip comes up, I hit ESC to clear it, then hit TAB to list the attribs, then ESC again, and so on. Maybe I plot something at some point, and then close it.

Sometimes, I get to the point where the cursor disappears, and the console doesn't respond to the keyboard. In my own app that embeds the (Rich)IPythonWidget, I can still access the menu and toolbar. Here's the associated error:

Traceback (most recent call last):
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/console_widget.py", line 225, in eventFilter
    return self._event_filter_console_keypress(event)
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/frontend_widget.py", line 270, in _event_filter_console_keypress
    return super(FrontendWidget, self)._event_filter_console_keypress(event)
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/console_widget.py", line 1041, in _event_filter_console_keypress
    self._keyboard_quit()
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/console_widget.py", line 1510, in _keyboard_quit
    self.input_buffer = ''
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/console_widget.py", line 490, in _set_input_buffer
    raise RuntimeError("Cannot change input buffer during execution.")
RuntimeError: Cannot change input buffer during execution.

I suppose this means the kernel is busy doing something it shouldn't be. Perhaps this is related to #499.

I have to close the console, and when I do, it seems to close cleanly. I'll try and reproduce this more reliably and report back.

@epatters
Copy link
Contributor

Due to fixes I made a while ago (I can't find the commit), it is no longer possible for this exception to be raised.

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants