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

All cells get stuck pending after specific cell is run #16466

Open
1 of 2 tasks
travisgroth opened this issue Feb 28, 2025 · 4 comments
Open
1 of 2 tasks

All cells get stuck pending after specific cell is run #16466

travisgroth opened this issue Feb 28, 2025 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@travisgroth
Copy link

travisgroth commented Feb 28, 2025

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

I have a notebook with multiple cells. One in particular runs a data transformation in about 4s. Any time I run this specific cell, I am unable to execute any cells afterwards. In order to continue working, I need to completely exit VScode and restart it. Interrupting the kernel is insufficient. I am able to reproduce this every time but it is specific to my data and query from what I can tell, so it's hard to share a repro.

If I run this same cell in a standard Jupyter notebook environment, this issue does not occur.

I've turned on trace logging but I'm not seeing anything to go on. I'm happy to gather more data but I need help figuring out how to do so.

In the logs below, I execute up to cell 6 and then try to execute 7, which hangs.

VS Code Version

1.97.2

Jupyter Extension Version

2025.1.0

Jupyter logs

23:50:09.853 [debug] Handle Execution of Cells 6 for ~/workspace/x/test.ipynb
23:50:09.854 [trace] Execute Notebook ~/workspace/x/test.ipynb. Step 1
23:50:09.854 [trace] Connect to Kernel ~/workspace/x/test.ipynb. Step 2
23:50:09.854 [trace] Connected to Kernel ~/workspace/x/test.ipynb. Step 3
23:50:09.854 [trace] executeCell 6. Step 4
23:50:09.855 [trace] Cell Index:6 sent to kernel
23:50:09.868 [trace] Start cell 6 execution @ 1740718209868 (clear output)
23:50:09.868 [debug] Kernel acknowledged execution of cell 6 @ 1740718209868
23:50:13.681 [trace] Version of IPyWidgets 8 determined after 0s
23:50:13.958 [trace] Cell 6 completed in 4.09s (start: 1740718209868, end: 1740718213958)
23:50:13.958 [trace] Cell 6 executed successfully
23:51:00.349 [debug] Handle Execution of Cells 7 for ~/workspace/x/test.ipynb
23:51:00.350 [trace] Execute Notebook ~/workspace/x/test.ipynb. Step 1
23:51:00.350 [trace] Connect to Kernel ~/workspace/x/test.ipynb. Step 2
23:51:00.350 [trace] Connected to Kernel ~/workspace/x/test.ipynb. Step 3
23:51:00.350 [trace] executeCell 7. Step 4
23:51:00.350 [trace] Cell Index:7 sent to kernel

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

Pylance

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@travisgroth travisgroth added the bug Issue identified by VS Code Team member as probable bug label Feb 28, 2025
@DonJayamanne
Copy link
Contributor

The logs refer to cell numbers, what cell number gets stuck.
Can you share the entire log and the point when things hang.

Any time I run this specific cell, I am unable to execute any cells afterwards.

What happens, nothing or there's an error.

@travisgroth
Copy link
Author

Log
Visual Studio Code (1.97.2, undefined, desktop)
Jupyter Extension Version: 2025.1.0.
Python Extension Version: 2025.1.2025022501.
Pylance Extension Version: 2025.2.1.
Platform: darwin (arm64).
Home = /Users/username
Temp Storage folder ~/Library/Application Support/Code/User/globalStorage/ms-toolsai.jupyter/version-2025.1.0
Workspace folder ~/workspace/x
08:11:30.347 [info] Telemetry is disabled
08:11:30.347 [info] Experiments are disabled, only manually opted experiments are active.
08:11:30.365 [debug] Start refreshing Kernel Picker (1740748290365)
08:11:30.404 [trace] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.8.10/bin/python
08:11:30.404 [trace] Search for KernelSpecs in Interpreter /usr/bin/python3
08:11:30.404 [trace] Search for KernelSpecs in Interpreter /usr/local/bin/python3.9
08:11:30.404 [trace] Search for KernelSpecs in Interpreter /opt/homebrew/bin/python3
08:11:30.404 [trace] Search for KernelSpecs in Interpreter /opt/homebrew/bin/python3.12
08:11:30.404 [trace] Search for KernelSpecs in Interpreter ~/workspace/x/.venv/bin/python
08:11:30.405 [debug] Get Custom Env Variables, Class name = Tm, completed in 40ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
08:11:30.405 [debug] Jupyter Paths /kernels: 
08:11:30.405 [debug] Kernel Spec Root Paths, /usr/share/jupyter/kernels, /usr/local/share/jupyter/kernels, ~/Library/Jupyter/kernels
08:11:30.410 [trace] No controller, hence notebook communications cannot be initialized for editor ~/workspace/x/test.ipynb
08:11:30.410 [debug] Start refreshing Interpreter Kernel Picker
08:11:30.463 [trace] Hiding default KernelSpec /python for interpreter ~/workspace/x/.venv/bin/python (KernelSpec file ~/workspace/x/.venv/share/jupyter/kernels/python3/kernel.json)
08:11:30.788 [debug] KernelProvider switched kernel to id = .jvsc74a57bd0a4e58e81fcef498f81f8975dc2786538bdeb4fdd4ec67bd5b5c998125dee523f./Users/~/workspace/x/.venv/python./Users/~/workspace/x/.venv/python.-m#ipykernel_launcher
08:11:30.788 [debug] start the kernel, options.disableUI=true for ~/workspace/x/test.ipynb
08:11:30.804 [trace] Registering commtarget jupyter.widget
08:11:30.805 [debug] Controller selection change completed
08:11:31.305 [debug] Get Custom Env Variables, Class name = Tm, completed in 0ms, has a truthy return value, Arg 1: "~/workspace/x", Arg 2: "RunPythonCode"
08:11:31.305 [info] Starting Kernel (Python Path: ~/workspace/x/.venv/bin/python, Venv, 3.13.1) for '~/workspace/x/test.ipynb' (disableUI=true)
08:11:31.305 [trace] Creating raw notebook for resource '~/workspace/x/test.ipynb'
08:11:31.615 [debug] Get Custom Env Variables, Class name = Tm, completed in 0ms, has a truthy return value, Arg 1: "~/workspace/x/test.ipynb", Arg 2: "RunPythonCode"
08:11:31.769 [trace] Conda file is conda
08:11:31.933 [debug] Launching kernel .jvsc74a57bd0a4e58e81fcef498f81f8975dc2786538bdeb4fdd4ec67bd5b5c998125dee523f./Users/~/workspace/x/.venv/python./Users/~/workspace/x/.venv/python.-m#ipykernel_launcher for ~/workspace/x/test.ipynb in ~/workspace/x with ports 9001, 9000, 9004, 9002, 9003
08:11:32.118 [debug] Got env vars from Python Ext in 503ms for ~/workspace/x/.venv/bin/python, with env var count 66.
08:11:32.118 [trace] Prepend PATH with python bin for ~/workspace/x/.venv/bin/python
08:11:32.118 [debug] Getting activated env variables, Class name = Cd, completed in 503ms, has a truthy return value, Arg 1: "~/workspace/x/test.ipynb", Arg 2: "~/workspace/x/.venv/bin/python", Arg 3: undefined
08:11:32.119 [info] Process Execution: ~/workspace/x/.venv/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
08:11:32.120 [info] Process Execution: ~/workspace/x/.venv/bin/python -m ipykernel_launcher --f=/Users/~/Library/Jupyter/runtime/kernel-v37e6d25a2a038f6acf09b7c386d7e6dd9f01fb9da.json
    > cwd: ~/workspace/x
08:11:32.120 [debug] Kernel process 15609.
08:11:32.159 [debug] Got env vars from Python Ext in 854ms for ~/workspace/x/.venv/bin/python, with env var count 66.
08:11:32.159 [trace] Prepend PATH with python bin for ~/workspace/x/.venv/bin/python
08:11:32.160 [debug] Getting activated env variables, Class name = Cd, completed in 855ms, has a truthy return value, Arg 1: "~/workspace/x", Arg 2: "~/workspace/x/.venv/bin/python", Arg 3: undefined
08:11:32.160 [info] Process Execution: ~/workspace/x/.venv/bin/python -m pip list
08:11:32.257 [trace] ipykernel version & path 6.29.5, ~/workspace/x/.venv/lib/python3.13/site-packages/ipykernel/__init__.py for ~/workspace/x/.venv/bin/python
08:11:32.391 [debug] Kernel output 15609: To connect another client to this kernel, use:
--existing kernel-v37e6d25a2a038f6acf09b7c386d7e6dd9f01fb9da.json
08:11:32.409 [debug] Waiting for Raw Session to be ready in postStartRawSession
08:11:32.409 [debug] Waiting for Raw session to be ready, status: connected
08:11:32.409 [trace] Raw session connected
08:11:32.409 [debug] Waited for Raw session to be ready & got status: connected
08:11:32.409 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
08:11:32.409 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
08:11:32.409 [debug] Sending request for kernelInfo
08:11:32.466 [trace] Got response for requestKernelInfo
08:11:32.466 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 57ms
08:11:32.467 [trace] Executing silently Code (idle) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
08:11:32.475 [trace] Executing silently Code (completed) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys with 1 output(s)
08:11:32.475 [trace] Started running kernel initialization for ~/workspace/x/test.ipynb
08:11:32.476 [trace] Executing silently Code (idle) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy
08:11:32.513 [trace] Executing silently Code (completed) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy with 1 output(s)
08:11:32.513 [trace] Determined IPyWidgets Version as 8
08:11:32.513 [trace] Version of IPyWidgets 8 determined after 1.708s
08:11:32.514 [trace] Executing silently Code (idle) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None):
08:11:32.521 [trace] Executing silently Code (completed) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None): with 0 output(s)
08:11:32.521 [debug] Requesting Kernel info
08:11:32.522 [trace] Got Kernel info
08:11:32.522 [trace] End running kernel initialization, now waiting for idle
08:11:32.522 [trace] Waiting for idle on (kernel): 47c85ce1-0f10-47c0-ac66-ff3ccbfbe347 -> idle
08:11:32.522 [trace] Finished waiting for idle on (kernel): 47c85ce1-0f10-47c0-ac66-ff3ccbfbe347 -> idle
08:11:32.522 [trace] End running kernel initialization, session is idle
08:11:32.522 [trace] Registering Kernel Completion Provider from kernel .venv (Python 3.13.1) for language python
08:11:32.523 [trace] IPyWidgetScriptSource.initialize
08:11:32.523 [info] Kernel successfully started
08:11:32.524 [debug] getDataDirsImpl, Class name = Or (started execution), Arg 1: "~/workspace/x/test.ipynb", Arg 2: "~/workspace/x/.venv/bin/python"
08:11:32.524 [debug] Get Custom Env Variables, Class name = Tm, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
08:11:32.524 [debug] Jupyter Paths : 
08:11:32.525 [info] Process Execution: ~/workspace/x/.venv/bin/python /Users/~/.vscode/extensions/ms-toolsai.jupyter-2025.1.0-darwin-arm64/pythonFiles/printJupyterDataDir.py
08:11:32.548 [debug] Got an empty Jupyter Data Dir from /Users/~/workspace/x/.venv/bin/python, stderr = undefined
08:11:32.548 [debug] getDataDirsImpl, Class name = Or, completed in 24ms, has a truthy return value, Arg 1: "~/workspace/x/test.ipynb", Arg 2: "~/workspace/x/.venv/bin/python", Return Value: <Uri:/Users/~/Library/Jupyter>, <Uri:/Users/~/workspace/x/.venv/share/jupyter>, <Uri:/usr/local/share/jupyter>, <Uri:/usr/share/jupyter>
08:11:32.816 [debug] Interpreter for Pylance for Notebook URI "~/workspace/x/test.ipynb" is ~/workspace/x/.venv/bin/python
08:11:34.271 [trace] Python API env change detected, update => '/Users/~/workspace/x/.venv/bin/python'
08:11:34.272 [trace] Python API env change detected, update => '/Users/~/.pyenv/versions/3.8.10/bin/python'
08:11:34.272 [trace] Python API env change detected, update => '/usr/bin/python3'
08:11:34.272 [trace] Python API env change detected, update => '/usr/local/bin/python3.9'
08:11:34.273 [trace] Python API env change detected, update => '/opt/homebrew/bin/python3'
08:11:34.273 [trace] Python API env change detected, update => '/opt/homebrew/bin/python3.12'
08:11:34.280 [debug] Refreshed Environments
08:11:35.280 [debug] End refreshing Kernel Picker (1740748290365)
08:11:46.992 [debug] Handle Execution of Cells 1 for ~/workspace/x/test.ipynb
08:11:46.993 [trace] Execute Notebook ~/workspace/x/test.ipynb. Step 1
08:11:46.993 [trace] Connect to Kernel ~/workspace/x/test.ipynb. Step 2
08:11:46.993 [trace] Connected to Kernel ~/workspace/x/test.ipynb. Step 3
08:11:46.994 [trace] executeCell 1. Step 4
08:11:46.995 [trace] Cell Index:1 sent to kernel
08:11:46.999 [trace] Start cell 1 execution @ 1740748306999 (clear output)
08:11:47.000 [debug] Kernel acknowledged execution of cell 1 @ 1740748306999
08:11:48.022 [trace] Cell 1 completed in 1.023s (start: 1740748306999, end: 1740748308022)
08:11:48.022 [trace] Cell 1 executed successfully
08:11:57.344 [debug] Handle Execution of Cells 1,3,4,6,7,8 for ~/workspace/x/test.ipynb
08:11:57.344 [trace] Execute Notebook ~/workspace/x/test.ipynb. Step 1
08:11:57.344 [trace] Connect to Kernel ~/workspace/x/test.ipynb. Step 2
08:11:57.344 [trace] Connected to Kernel ~/workspace/x/test.ipynb. Step 3
08:11:57.344 [trace] executeCell 1. Step 4
08:11:57.344 [trace] executeCell 3. Step 4
08:11:57.344 [trace] executeCell 4. Step 4
08:11:57.344 [trace] executeCell 6. Step 4
08:11:57.345 [trace] executeCell 7. Step 4
08:11:57.345 [trace] executeCell 8. Step 4
08:11:57.345 [trace] Cell Index:1 sent to kernel
08:11:57.349 [trace] Start cell 1 execution @ 1740748317349 (clear output)
08:11:57.349 [debug] Kernel acknowledged execution of cell 1 @ 1740748317349
08:11:57.352 [trace] Cell 1 completed in 0.002s (start: 1740748317349, end: 1740748317351)
08:11:57.352 [trace] Cell 1 executed successfully
08:11:57.352 [trace] Cell Index:3 sent to kernel
08:11:57.356 [trace] Start cell 3 execution @ 1740748317356 (clear output)
08:11:57.356 [debug] Kernel acknowledged execution of cell 3 @ 1740748317356
08:11:57.510 [trace] Cell 3 completed in 0.154s (start: 1740748317356, end: 1740748317510)
08:11:57.510 [trace] Cell 3 executed successfully
08:11:57.510 [trace] Cell Index:4 sent to kernel
08:11:57.513 [trace] Start cell 4 execution @ 1740748317513 (clear output)
08:11:57.513 [debug] Kernel acknowledged execution of cell 4 @ 1740748317513
08:11:59.446 [trace] Cell 4 completed in 1.933s (start: 1740748317513, end: 1740748319446)
08:11:59.446 [trace] Cell 4 executed successfully
08:11:59.446 [trace] Cell Index:6 sent to kernel
08:11:59.448 [trace] Start cell 6 execution @ 1740748319448 (clear output)
08:11:59.448 [debug] Kernel acknowledged execution of cell 6 @ 1740748319448
08:12:03.293 [trace] Cell 6 completed in 3.845s (start: 1740748319448, end: 1740748323293)
08:12:03.293 [trace] Cell 6 executed successfully
08:12:03.293 [trace] Cell Index:7 sent to kernel
08:12:03.967 [trace] IPyWidget version in Kernel is 8.
08:12:03.968 [trace] Version of IPyWidgets 8 determined after 0s

This is an execution of the first cell and all subsequent cells. There are 7+.

Cell 6 is the last successful cell to execute and is the problematic one. I get no error - the code works fine - and if I add an extra line or two after the existing code, it shows up. So whatever is in the cell appears to complete.

Cell 7 (or a re-run of 6 or any prior cell) will show what you see here in the logs. Sent to kernel but nothing further. No error even if I wait for some time. In the UI, it shows as Pending when I hover over the status icon.

If I try to interrupt and try to just run cell 7, it also gets into the same state:

Log
08:25:29.224 [debug] VS Code interrupted kernel for ~/workspace/x/test.ipynb
08:25:29.224 [debug] Command interrupted kernel for ~/workspace/x/test.ipynb
08:25:29.224 [debug] interrupt the kernel, options.disableUI=false for ~/workspace/x/test.ipynb
08:25:29.224 [info] Interrupt kernel execution
08:25:29.225 [debug] Cancel pending cells
08:25:29.225 [trace] Cell 7 completed in 0s (start: undefined, end: undefined)
08:25:29.225 [trace] Cell 8 completed in 0s (start: undefined, end: undefined)
08:25:29.225 [info] Interrupt requested ~/workspace/x/test.ipynb
08:25:29.226 [info] Interrupt kernel execution
08:25:29.226 [info] Interrupting kernel: python3131jvsc74a57bd0a4e58e81fcef498f81f8975dc2786538bdeb4fdd4ec67bd5b5c998125dee523f
08:25:29.226 [info] Interrupting kernel via SIGINT
08:25:29.230 [trace] Cell 7 executed successfully
08:25:29.230 [trace] Cell 8 executed successfully
08:25:29.258 [info] Interrupt requested & sent for ~/workspace/x/test.ipynb in notebookEditor.
08:25:39.487 [debug] Handle Execution of Cells 7 for ~/workspace/x/test.ipynb
08:25:39.487 [trace] Execute Notebook ~/workspace/x/test.ipynb. Step 1
08:25:39.487 [trace] Connect to Kernel ~/workspace/x/test.ipynb. Step 2
08:25:39.488 [trace] Connected to Kernel ~/workspace/x/test.ipynb. Step 3
08:25:39.488 [trace] executeCell 7. Step 4
08:25:39.488 [trace] Cell Index:7 sent to kernel

A kernel restart seems to never complete. This spins with "restarting kernel" in the UI:

Log
08:25:46.810 [debug] VS Code interrupted kernel for ~/workspace/x/test.ipynb
08:25:46.810 [debug] Command interrupted kernel for ~/workspace/x/test.ipynb
08:25:46.810 [debug] interrupt the kernel, options.disableUI=false for ~/workspace/x/test.ipynb
08:25:46.811 [info] Interrupt kernel execution
08:25:46.811 [debug] Cancel pending cells
08:25:46.811 [trace] Cell 7 completed in 0s (start: undefined, end: undefined)
08:25:46.811 [info] Interrupt requested ~/workspace/x/test.ipynb
08:25:46.812 [info] Interrupt kernel execution
08:25:46.812 [info] Interrupting kernel: python3131jvsc74a57bd0a4e58e81fcef498f81f8975dc2786538bdeb4fdd4ec67bd5b5c998125dee523f
08:25:46.812 [info] Interrupting kernel via SIGINT
08:25:46.814 [trace] Cell 7 executed successfully
08:25:46.841 [info] Interrupt requested & sent for ~/workspace/x/test.ipynb in notebookEditor.
08:25:48.282 [debug] Restart kernel command handler for ~/workspace/x/test.ipynb
08:25:48.282 [debug] restart the kernel, options.disableUI=false for ~/workspace/x/test.ipynb
08:25:48.282 [info] Restart requested ~/workspace/x/test.ipynb
08:25:48.283 [debug] Cancel pending cells
08:25:48.283 [debug] Dispose Kernel process 15609.
08:25:48.287 [debug] Get Custom Env Variables, Class name = Tm, completed in 1ms, has a truthy return value, Arg 1: "~/workspace/x/test.ipynb", Arg 2: "RunPythonCode"
08:25:48.291 [debug] Launching kernel .jvsc74a57bd0a4e58e81fcef498f81f8975dc2786538bdeb4fdd4ec67bd5b5c998125dee523f./Users/~/workspace/x/.venv/python./Users/~/workspace/x/.venv/python.-m#ipykernel_launcher for ~/workspace/x/test.ipynb in ~/workspace/x with ports 9006, 9005, 9009, 9007, 9008
08:25:48.315 [debug] Disposed Kernel process 15609.
08:25:48.411 [debug] KernelProcess Exited 15609, Exit Code - null
08:25:48.449 [debug] Got env vars from Python Ext in 163ms for ~/workspace/x/.venv/bin/python, with env var count 66.
08:25:48.449 [trace] Prepend PATH with python bin for ~/workspace/x/.venv/bin/python
08:25:48.450 [debug] Getting activated env variables, Class name = Cd, completed in 164ms, has a truthy return value, Arg 1: "~/workspace/x/test.ipynb", Arg 2: "~/workspace/x/.venv/bin/python", Arg 3: undefined
08:25:48.450 [info] Process Execution: ~/workspace/x/.venv/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
08:25:48.451 [info] Process Execution: ~/workspace/x/.venv/bin/python -m ipykernel_launcher --f=/Users/~/Library/Jupyter/runtime/kernel-v3c85320e2241a809a468d02a0ce80a078724d8442.json
    > cwd: ~/workspace/x
08:25:48.451 [debug] Kernel process 16208.
08:25:48.590 [trace] ipykernel version & path 6.29.5, ~/workspace/x/.venv/lib/python3.13/site-packages/ipykernel/__init__.py for ~/workspace/x/.venv/bin/python
08:25:48.751 [debug] Kernel output 16208: To connect another client to this kernel, use:
--existing kernel-v3c85320e2241a809a468d02a0ce80a078724d8442.json
08:25:48.860 [debug] Waiting for Raw Session to be ready in postStartRawSession
08:25:48.860 [debug] Waiting for Raw session to be ready, status: connected
08:25:48.860 [trace] Raw session connected
08:25:48.860 [debug] Waited for Raw session to be ready & got status: connected
08:25:48.860 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
08:25:48.860 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
08:25:48.860 [debug] Sending request for kernelInfo
08:25:48.864 [trace] Got response for requestKernelInfo
08:25:48.864 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 4ms
08:25:48.864 [info] Restarted 47c85ce1-0f10-47c0-ac66-ff3ccbfbe347
08:25:48.865 [trace] Executing silently Code (busy) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
08:25:48.865 [error] Failed to write data to the kernel channel shell [
  <Buffer 3c 49 44 53 7c 4d 53 47 3e>,
  <Buffer 38 37 65 66 37 65 34 61 63 66 30 32 61 30 32 31 66 33 30 37 39 61 33 36 66 65 33 31 34 66 38 33 65 31 33 33 38 31 64 35 39 38 37 65 37 32 37 30 37 34 ... 14 more bytes>,
  <Buffer 7b 22 64 61 74 65 22 3a 22 32 30 32 35 2d 30 32 2d 32 38 54 31 33 3a 31 32 3a 30 33 2e 32 39 33 5a 22 2c 22 6d 73 67 5f 69 64 22 3a 22 37 63 39 33 63 ... 177 more bytes>,
  <Buffer 7b 7d>,
  <Buffer 7b 22 63 65 6c 6c 49 64 22 3a 22 76 73 63 6f 64 65 2d 6e 6f 74 65 62 6f 6f 6b 2d 63 65 6c 6c 3a 2f 55 73 65 72 73 2f 74 67 72 6f 74 68 2f 77 6f 72 6b ... 45 more bytes>,
  <Buffer 7b 22 73 69 6c 65 6e 74 22 3a 66 61 6c 73 65 2c 22 73 74 6f 72 65 5f 68 69 73 74 6f 72 79 22 3a 74 72 75 65 2c 22 75 73 65 72 5f 65 78 70 72 65 73 73 ... 305 more bytes>
] [Error: Socket is closed
	at a.postToSocket (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2025.1.0-darwin-arm64/dist/extension.node.js:304:8060)
	at /Users/~/.vscode/extensions/ms-toolsai.jupyter-2025.1.0-darwin-arm64/dist/extension.node.js:304:7804] {
  errno: 9,
  code: 'EBADF'
}

@DonJayamanne
Copy link
Contributor

Thanks for the logs, not sure whats going on.
Please confirm you are using the exact same Python environment from Jupyter Lab as well.
I.e. ensure you install and launch jupyter lab from the activated virtual environment in a terminal.

If that still works, then I have to ask you share some of the code or try to simplify the code in a format such that you can replicate the issue as well as share it. Else unfortunately I will not be able to help. Hope you understand.

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) labels Feb 28, 2025
@travisgroth
Copy link
Author

Yes, I just double checked and all cells complete from jupyter-notebook in that same virtual environment.

Definitely understand. I will continue to try a minimal repro. I was hoping there was some additional debugging info I could capture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

2 participants