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

Kernel cannot be interrupted when using jupyter_client #410

Open
markolenik opened this issue Feb 20, 2020 · 2 comments
Open

Kernel cannot be interrupted when using jupyter_client #410

markolenik opened this issue Feb 20, 2020 · 2 comments

Comments

@markolenik
Copy link

When sending code through the jupyter_client API to QtConsole, a process cannot be interrupted (e.g. using Ctrl-C). The only way to stop a running process is to restart the kernel (Ctrl-.).

Reproduce

To reproduce run the following code in QtConsole and try interrupting it with Ctrl-C (shouldn't work):

import jupyter_client as jc
import time

cfile = jc.find_connection_file()
km = jc.KernelManager(connection_file=cfile)
km.load_connection_file()
kc = km.client()
kc.start_channels()

msg = """
while True:
    print('hi again')
    time.sleep(0.5)
"""

kc.execute(msg)

System information

Ubuntu: 19.10
jupyter core : 4.6.3
jupyter-notebook : 6.0.2
qtconsole : 4.6.0
ipython : 7.12.0
ipykernel : 5.1.4
jupyter client : 5.3.4

@jacobm3
Copy link

jacobm3 commented May 7, 2020

Appears to still be an issue in Windows.

Jupyter QtConsole 4.7.3
Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)]
IPython 7.13.0

It prevents the Spyder debugger from stopping running Python apps. More detail here: spyder-ide/spyder#12640

@nmostert
Copy link

This is still causing issues for me.

Ubuntu 20.04
jupyter core : 4.7.1
jupyter-notebook : 6.4.0
qtconsole : 5.1.0
ipython : 7.24.0
ipykernel : 5.3.4
jupyter client : 6.1.12

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

No branches or pull requests

3 participants