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

Interrupt & Restart buttons do not work for Julia on jupyter #1052

Open
jaepillee0315 opened this issue Aug 25, 2022 · 2 comments
Open

Interrupt & Restart buttons do not work for Julia on jupyter #1052

jaepillee0315 opened this issue Aug 25, 2022 · 2 comments

Comments

@jaepillee0315
Copy link

When I click the restart/stop button in jupyter while a code block is running, the timer on the running cell does not stop and I simply cannot rerun the ipynb file. "Go to running cell" still shows that the code block is running. I just have to close VSCode to start over. ^c does not work, either.

  • Julia's workspace is cleared as it is supposed to be, though.
  • Buttons and ^c work when I work with Python.

As you can see, Jupyter server is hung when I try to interrupt kernel execution.

info 10:4:56.174: Interrupt kernel execution
info 10:4:56.174: Cancel pending cells
info 10:4:56.174: Interrupting kernel: julia-1.7
info 10:4:56.174: Interrupting kernel with a shell message
warn 10:5:6.189: Error during interrupt: Error: Kernel interrupt failed. Jupyter server is hung. Please reload VS Code.

The stop button works fine in Jupyter Notebook, but a similar problem persists in the Jupyterlab application. When I click 'stop', Jupyter Notebook returns InterruptException:, but the kernel stays 'busy'. When I try to run other cells, the kernel does not do anything.

Take a look at microsoft/vscode-jupyter#10328
The VS code manager I talked to in the issue agrees that the server is hung when I try to stop the code, and the person suspects it may be an issue with the Julia kernel not working well with jupyter notebooks.

I posted this issue on /julia-vscode and /vscode-jupyter, but based on the responses I get, it looks like the issue is in IJulia.

@Willem-Mazzotti-P
Copy link

Hi,
I am having the same issue. The stop button works in a jupyter notebook with Python kernel.

VSCode Version

1.74.3

Jupyter Extension Version

v2022.11.1003412109

Coding Language and Runtime Version

Julia 1.7.3

Julia VS code extension

v1.38.2

IJulia

IJulia v1.24.0

@pitipatw
Copy link

pitipatw commented Feb 6, 2024

Hi, I am also having the same problem when running Julia on a Jupyter notebook, i.e. when running a code, let say it stuck in a loop, I can't stop or restart it using Jupyter's "Restart" and "Stop" buttons. Pressing those buttons does nothing, the script will keep running.

I am using Julia 1.9.2
VScode Julia extension v1.47.2
Juypter notebook extension v2022.8.1002431955

The satisfying way to get around this is to close VScode entirely and restart the whole process.

The workaround, I'm not sure if this is right,

  1. Stop the notebook from the Julia Extension on the left side of the VScode. (This will not stop the running block.)
  2. Make a copy of the running block.
  3. Delete the running block
  4. Run the whole code again. (Since you can't stop the running block, but entire notebook)

Im not sure if this will just the display issue between Julia and Jupyter notebook, but it is definitely worth taking a look for a smoother experience between Julia and Jupyter notebook.

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