Closed abhyuditjain closed 1 year ago
I keep getting a similar kind of error a lot these days. Sometimes a certain cell runs fine, then I wait a bit and then try to re-run it again and it takes alot of time ultimately crashing and me having to restart the Kernel. This also happens alot when I'm debugging.
[info] Starting debugging with mode 1 10:38:15.296 [error] Disposing session as kernel process died ExitCode: undefined, Reason: invalid command name "140084133119744idle_draw" while executing "140084133119744idle_draw" ("after" script)
10:38:15.296 [info] Dispose Kernel process 158945.
10:38:15.296 [error] Raw kernel process exited code: undefined
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.311 [error] KernelDebugAdapter::handleMessage failure: Error: Canceled future for debug_request message before replies were done
10:38:15.314 [error] Jupyter Extension (Error in onKernelStatusChanged, method:onKernelStatusChanged): [Error: CANNOT execute cell that has been REMOVED from notebook
at e.ExtHostNotebookKernels._createNotebookCellExecution (/snap/code/130/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:101:102321)
at Object.createNotebookCellExecution (/snap/code/130/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:101:98283)
at im.create (~/.vscode/extensions/ms-toolsai.jupyter-2023.5.1001582324-linux-x64/out/extension.node.js:17:179570)
at im.getOrCreate (~/.vscode/extensions/ms-toolsai.jupyter-2023.5.1001582324-linux-x64/out/extension.node.js:17:179443)
at Sm (~/.vscode/extensions/ms-toolsai.jupyter-2023.5.1001582324-linux-x64/out/extension.node.js:17:188549)
at xm.endCellAndDisplayErrorsInCell (~/.vscode/extensions/ms-toolsai.jupyter-2023.5.1001582324-linux-x64/out/extension.node.js:17:196581)
at xm.onKernelStatusChanged (~/.vscode/extensions/ms-toolsai.jupyter-2023.5.1001582324-linux-x64/out/extension.node.js:17:196185)
at r.value (~/.vscode/extensions/ms-toolsai.jupyter-2023.5.1001582324-linux-x64/out/extension.node.js:2:1587966)
at b.invoke (/snap/code/130/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
at d.deliver (/snap/code/130/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121)
at n.fire (/snap/code/130/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729)
at tg.
Thank you for filing this issue and sorry you are running into this.
In the past we have found that users run into similar issues when dealing with torch
, pytorch
or tensorflow
Basically incorrectly installed packages such as the above can cause the kernel to crash,
Right now the kernel is crashing when running code,
Please can you try running some hello world code like print("Hello World")
in a cell and verify that it works.
If this works, then this is an indication that the packages are to blame and we can look into that separately (right now i'd like to narrow down the issue)
Please let me know how things go
Hi @DonJayamanne,
I ran print()
and it does work fine. However, that was working fine as I mentioned in my description. One more issue that I am facing is with tqdm
. It used to work fine a while back, but now, whenever a print statement follows a tqdm set_description, it starts printing in new lines.
to work fine a while back, but now, whenever a print statement follows a tqdm set_description, it starts printing in new lines.
That’s problem in vscode and not Jupyter extension https://github.com/microsoft/vscode/issues/184657
and it does work fine.
can you share the Jupyter extension logs when you run the print statement i would like to see the details of the python env in the logs
after that, please run the same notebook in the Jupyter notebook/lab application against the same python environment,
Let me know if it fails in Jupyter lab/notebook as well and share the logs from the terminal
For me, even print won't work now. I was running some cells and everything was working fine until suddenly, the cells stop running and just show the small "clock" symbol in the cell showing that it's running but not really executing itself. New cells also display the same behaviour. My log shows [info] Handle Execution of Cells 33 for mynotebook.ipynb It's just stuck there. When I tried to restart the kernel, it told me I need to setup Ipykernel even though I have it installed. Ipykernel version I have is 6.23.2
@MustafaDragonborne looks like you are running into a different issue Please could you create a separate issue so we can look into that separately
@DonJayamanne I am having a very similar issue running jupyter notebooks both in vs code and in the browser and for both Python and R scripts. most of the cells run fine but some crash kernels with 'ExitCode: undefined'. Have you managed to fix the issue?
most of the cells run fine but some crash kernels with 'ExitCode: undefined'. Have you managed to fix the issue?
Does this crash in the browser as well. If it does, can you sahre the logs from the Jupyter in the terminal
Have you managed to fix the issue?
No, is generally an indicatiohn of the fact that there is a problem in the installed package, hence its an issue with the user environment (ie. python environment)
See here for information requested https://github.com/microsoft/vscode-jupyter/issues/13678#issuecomment-1589069402
@DonJayamanne sorry cannot post the logs anymore. I tried reinstalling my entire system but nothing helped. In the end, I ended up upgrading my RAM and that solved the issue. Not sure how helpful that is though.
Applies To
What happened?
I have a notebook that works fine on Google Colab. So I created an environment using
pyenv
with the same python version and package versions on my local system.I have selected the interpreter as the correct one (I only have 1 virtual environment). After a few cells (where I import and define functions) run fine, but where I actually do some work, kernel crashes.
Packages
VS Code Version
Version: 1.79.0 (user setup) Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302 Date: 2023-06-07T14:26:35.552Z Electron: 22.5.5 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22621
Jupyter Extension Version
v2023.5.1001582324
Jupyter logs
Coding Language and Runtime Version
Python 3.10.12
Language Extension Version (if applicable)
v2023.10.0
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local