Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
mspacek opened this Issue · 1 comment

2 participants

@mspacek

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

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
@damianavila damianavila referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
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.