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

Runtime Error raised while closing IPython Console instance #5568

Closed
yb520bbtt opened this issue Oct 25, 2017 · 2 comments
Closed

Runtime Error raised while closing IPython Console instance #5568

yb520bbtt opened this issue Oct 25, 2017 · 2 comments

Comments

@yb520bbtt
Copy link

Description

What steps will reproduce the problem?

What is the expected output? What do you see instead?

Please provide any additional information below

File "C:\ProgramData\Anaconda2\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1236, in close_client
client.stop_button_click_handler()
File "C:\ProgramData\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\client.py", line 235, in stop_button_click_handler
self.interrupt_kernel()
File "C:\ProgramData\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\client.py", line 391, in interrupt_kernel
self.shellwidget.request_interrupt_kernel()
File "C:\ProgramData\Anaconda2\lib\site-packages\qtconsole\frontend_widget.py", line 345, in request_interrupt_kernel
self.interrupt_kernel()
File "C:\ProgramData\Anaconda2\lib\site-packages\qtconsole\frontend_widget.py", line 638, in interrupt_kernel
self.kernel_manager.interrupt_kernel()
File "C:\ProgramData\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 408, in interrupt_kernel
raise RuntimeError("Cannot interrupt kernel. No kernel is running!")
RuntimeError: Cannot interrupt kernel. No kernel is running!

Version and main components

  • Spyder Version: 3.2.3
  • Python Version: 2.7.13
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.5.0  :  1.5.0 (OK)
pycodestyle >=2.3 :  2.3.1 (OK)
@yb520bbtt
Copy link
Author

111

@ccordoba12
Copy link
Member

Thanks for reporting.

@dalthviz, please work on this one. The fix simply consists in surrounding client.stop_button_click_handler() with a try/except that catches RuntimeError.

@dalthviz dalthviz changed the title test Runtime Error raised while closing IPython Console instance Oct 26, 2017
@CAM-Gerlach CAM-Gerlach mentioned this issue Feb 9, 2018
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

3 participants