Skip to content

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

mspacek opened this Issue Jun 2, 2011 · 1 comment

2 participants

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/", line 225, in eventFilter
    return self._event_filter_console_keypress(event)
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/", 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/", line 1041, in _event_filter_console_keypress
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/", line 1510, in _keyboard_quit
    self.input_buffer = ''
  File "/home/mspacek/source/ipython/IPython/frontend/qt/console/", 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.


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.

@epatters epatters closed this Aug 18, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.