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

bug in VS Code using jupyternote: ExitCode: 3221225477 #16086

Closed
DonJayamanne opened this issue Oct 1, 2024 Discussed in #16085 · 6 comments
Closed

bug in VS Code using jupyternote: ExitCode: 3221225477 #16086

DonJayamanne opened this issue Oct 1, 2024 Discussed in #16085 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@DonJayamanne
Copy link
Contributor

Discussed in #16085

Originally posted by Philipp-Ro October 2, 2024
I am running since days into the following problem I am trying to use Jupyter notebooks in my VS Code with selection a venv as interpreter.
The funny thing is there are old venvs which still work but a brand new project with new venv, new jupyter and ipykernel installed on are all running into the following issue.
Help would be greatly apriciated =)

here is the jupyter log :

Visual Studio Code (1.93.1, undefined, desktop)
Jupyter Extension Version: 2024.8.1.
Python Extension Version: 2024.14.1.
Pylance Extension Version: 2024.9.2.
Platform: win32 (x64).
Temp Storage folder ~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2024.8.1
Workspace folder ~\codingProjects\Finance, Home = c:\Users\phili
13:33:12.271 [info] Starting Kernel (Python Path: ~\codingProjects\Finance\env_fin\Scripts\python.exe, Venv, 3.8.5) for '~\codingProjects\Finance\test.ipynb' (disableUI=true)
13:33:12.600 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -m pip list
13:33:12.661 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
13:33:14.277 [info] Process Execution: c:\Anaconda3\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 34008
    > cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\pythonFiles\vscode_datascience_helpers
13:33:14.427 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v32b97404c00f30dd3ac06b2c20d50b90b5870dd25.json
    > cwd: ~\codingProjects\Finance
13:33:15.517 [error] Disposing session as kernel process died ExitCode: 3221225477, Reason: 
13:33:15.518 [error] Failed to request kernel info [Canceled: Canceled
	at i.value (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:181:24587)
	at r.B (c:\Users\~\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:90:732)
	at r.fire (c:\Users\~\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:90:949)
	at A.cancel (c:\Users\~\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:90:5355)
	at T.cancel (c:\Users\~\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:90:5765)
	at L_.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:11705)
	at r.B (c:\Users\~\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:90:732)
	at r.C (c:\Users\~\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:90:802)
	at r.fire (c:\Users\~\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:90:1018)
	at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:299:44443)
	at ChildProcess.emit (node:events:531:35)
	at ChildProcess._handle.onexit (node:internal/child_process:294:12)]
13:33:15.519 [warn] Failed to shutdown kernel, .jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.-m#ipykernel_launcher [TypeError: Failed to parse URL from /api/kernels/b362c3a1-4636-44ae-bd4f-b9c8a540ea2f?1727782395519
	at new Request (node:internal/deps/undici/undici:4855:19)
	at Object.t [as handleRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:2054)
	at Object.t [as makeRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:730)
	at Object.Vl [as shutdownKernel] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:5781)
	at n.shutdown (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:89571)
	at L_.start (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:12333)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async U_.startKernel (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:21270)
	at async Ay.create (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:23577)
	at async n_.createJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:285:35993)
	at async n_.startJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:285:34001)
	at async n.wrapKernelMethodImpl (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:82604)] {
  [cause]: [TypeError: Invalid URL
  	at new URL (node:internal/url:797:36)
  	at new Request (node:internal/deps/undici/undici:4853:25)
  	at Object.t [as handleRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:2054)
  	at Object.t [as makeRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:730)
  	at Object.Vl [as shutdownKernel] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:5781)
  	at n.shutdown (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:89571)
  	at L_.start (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:12333)
  	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  	at async U_.startKernel (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:21270)
  	at async Ay.create (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:23577)
  	at async n_.createJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:285:35993)
  	at async n_.startJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:285:34001)
  	at async n.wrapKernelMethodImpl (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.8.1-win32-x64\dist\extension.node.js:304:82604)] {
    code: 'ERR_INVALID_URL',
    input: '/api/kernels/b362c3a1-4636-44ae-bd4f-b9c8a540ea2f?1727782395519'
  }
```</div>
@DonJayamanne
Copy link
Contributor Author

@Philipp-Ro

Please could you enable logging as follows:

  • Open settings & go into Jupyter->Logging
  • Change the value to trace
  • Reload VS Code,
  • Attempt to repro the issue & then copy the output from the Jupyter output panel (use the command Jupyter: Show Output to get to the logs).

@DonJayamanne DonJayamanne self-assigned this Oct 1, 2024
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) labels Oct 1, 2024
@jnteruel
Copy link

jnteruel commented Oct 2, 2024

I got the same exit code also for a while, when trying to run a public library. It turns out it was linked to Python 3.12. We run the same code on an environment based on Python 3.10 and it worked. Perhaps try that ?

@Philipp-Ro
Copy link

Philipp-Ro commented Oct 4, 2024

@DonJayamanne here is the output with trace enabled:

Show Logs
Visual Studio Code (1.94.0, undefined, desktop)
Jupyter Extension Version: 2024.9.1.
Python Extension Version: 2024.14.1.
Pylance Extension Version: 2024.9.2.
Platform: win32 (x64).
Temp Storage folder ~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2024.9.1
Workspace folder ~\codingProjects\Finance, Home = c:\Users\phili
12:19:48.553 [debug] Start refreshing Kernel Picker (1728037188553)
12:19:48.600 [trace] Preferred Remote kernel for ~\codingProjects\Finance\test.ipynb is undefined
12:19:48.603 [info] Deleting old temp dir c:\Users\~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2024.8.1
12:19:48.607 [trace] No controller, hence notebook communications cannot be initialized for editor ~\codingProjects\Finance\test.ipynb
12:19:49.556 [trace] Search for KernelSpecs in Interpreter c:\Anaconda3\python.exe
12:19:49.557 [trace] Search for KernelSpecs in Interpreter c:\Anaconda3\envs\FullStack\python.exe
12:19:49.557 [trace] Search for KernelSpecs in Interpreter c:\Anaconda3\envs\MasterThesis\python.exe
12:19:49.558 [trace] Search for KernelSpecs in Interpreter ~\OneDrive\Projekte\Code\GitHub\timeseries_forcast_in_finance_MLops\env\Scripts\python.exe
12:19:49.558 [trace] Search for KernelSpecs in Interpreter ~\codingProjects\Finance\env_fin\Scripts\python.exe
12:19:49.560 [debug] Get Custom Env Variables, Class name = Cm, completed in 1006ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
12:19:49.560 [debug] Jupyter Paths kernels: 
12:19:49.560 [debug] Kernel Spec Root Paths, home\vscode\.local\share\jupyter\kernels, c:\ProgramData\jupyter\kernels
12:19:50.106 [debug] KernelProvider switched kernel to id = .jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.-m#ipykernel_launcher
12:19:50.106 [debug] start the kernel, options.disableUI=true for ~\codingProjects\Finance\test.ipynb
12:19:50.128 [trace] Registering commtarget jupyter.widget
12:19:50.130 [debug] Controller selection change completed
12:19:50.178 [debug] Get Custom Env Variables, Class name = Cm, completed in 1ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance", Arg 2: "RunPythonCode"
12:19:50.179 [info] Starting Kernel (Python Path: ~\codingProjects\Finance\env_fin\Scripts\python.exe, Venv, 3.8.5) for '~\codingProjects\Finance\test.ipynb' (disableUI=true)
12:19:50.180 [trace] Creating raw notebook for resource '~\codingProjects\Finance\test.ipynb'
12:19:50.272 [debug] Get Custom Env Variables, Class name = Cm, completed in 0ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance/test.ipynb", Arg 2: "RunPythonCode"
12:19:50.302 [trace] Hiding default KernelSpec c:\Anaconda3\python.exe for interpreter c:\Anaconda3\python.exe (KernelSpec file c:\Anaconda3\share\jupyter\kernels\python3\kernel.json)
12:19:50.303 [trace] Hiding default KernelSpec c:\Anaconda3\envs\MasterThesis\python.exe for interpreter c:\Anaconda3\envs\MasterThesis\python.exe (KernelSpec file c:\Anaconda3\envs\MasterThesis\share\jupyter\kernels\python3\kernel.json)
12:19:50.304 [trace] Hiding default KernelSpec python for interpreter ~\codingProjects\Finance\env_fin\Scripts\python.exe (KernelSpec file ~\codingProjects\Finance\env_fin\share\jupyter\kernels\python3\kernel.json)
12:19:50.304 [debug] End refreshing Kernel Picker (1728037188553)
12:19:50.325 [debug] Launching kernel .jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.-m#ipykernel_launcher for ~\codingProjects\Finance\test.ipynb in ~\codingProjects\Finance with ports 9001, 9000, 9004, 9002, 9003
12:19:50.328 [debug] Get Custom Env Variables, Class name = Cm, completed in 0ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance/test.ipynb", Arg 2: "RunPythonCode"
12:19:50.757 [debug] Got env vars from Python Ext in 485ms for ~\codingProjects\Finance\env_fin\Scripts\python.exe, with env var count 67.
12:19:50.758 [trace] Prepend PATH with python bin for ~\codingProjects\Finance\env_fin\Scripts\python.exe
12:19:50.759 [debug] Getting activated env variables, Class name = gd, completed in 487ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance/test.ipynb", Arg 2: "~\\CODINGPROJECTS\\FINANCE\\ENV_FIN\\SCRIPTS\\PYTHON.EXE", Arg 3: undefined
12:19:50.773 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
12:19:50.777 [debug] Got env vars from Python Ext in 600ms for ~\codingProjects\Finance\env_fin\Scripts\python.exe, with env var count 67.
12:19:50.777 [trace] Prepend PATH with python bin for ~\codingProjects\Finance\env_fin\Scripts\python.exe
12:19:50.778 [debug] Getting activated env variables, Class name = gd, completed in 601ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance", Arg 2: "~\\CODINGPROJECTS\\FINANCE\\ENV_FIN\\SCRIPTS\\PYTHON.EXE", Arg 3: undefined
12:19:50.791 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -m pip list
12:19:51.315 [trace] ipykernel version & path 6.29.5, ~\codingProjects\Finance\env_fin\lib\site-packages\ipykernel\__init__.py for ~\codingProjects\Finance\env_fin\Scripts\python.exe
12:19:51.777 [debug] Interpreter for Pylance for Notebook URI "~\codingProjects\Finance\test.ipynb" is ~\codingProjects\Finance\env_fin\Scripts\python.exe
12:19:53.092 [debug] Start refreshing Interpreter Kernel Picker
12:19:53.093 [debug] Start refreshing Kernel Picker (1728037193093)
12:19:53.198 [debug] Handle Execution of Cells 0 for ~\codingProjects\Finance\test.ipynb
12:19:53.199 [trace] Execute Notebook ~\codingProjects\Finance\test.ipynb. Step 1
12:19:53.199 [trace] Connect to Kernel ~\codingProjects\Finance\test.ipynb. Step 2
12:19:53.232 [trace] Conda file is conda
12:19:54.214 [trace] Python API env change detected, update => 'C:\USERS\~\ONEDRIVE\PROJEKTE\CODE\GITHUB\TIMESERIES_FORCAST_IN_FINANCE_MLOPS\ENV\SCRIPTS\PYTHON.EXE'
12:19:54.216 [trace] Python API env change detected, update => 'C:\USERS\~\CODINGPROJECTS\FINANCE\ENV_FIN\SCRIPTS\PYTHON.EXE'
12:19:54.217 [trace] Python API env change detected, update => 'C:\ANACONDA3\PYTHON.EXE'
12:19:54.218 [trace] Python API env change detected, update => 'C:\ANACONDA3\ENVS\FULLSTACK\PYTHON.EXE'
12:19:54.219 [trace] Python API env change detected, update => 'C:\ANACONDA3\ENVS\MASTERTHESIS\PYTHON.EXE'
12:19:54.222 [debug] Refreshed Environments
12:19:54.639 [debug] Got env vars from Python Ext in 4311ms for c:\Anaconda3\python.exe, with env var count 74.
12:19:54.639 [trace] Prepend PATH with python bin for c:\Anaconda3\python.exe
12:19:54.640 [debug] Getting activated env variables, Class name = gd, completed in 4312ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance/test.ipynb", Arg 2: "C:\\ANACONDA3\\PYTHON.EXE", Arg 3: undefined
12:19:54.648 [info] Process Execution: c:\Anaconda3\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 16868
    > cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\pythonFiles\vscode_datascience_helpers
12:19:54.781 [trace] Got a response of 1800 for INITIALIZE_INTERRUPT:0
12:19:54.790 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v3097bbc7e3a16088d8397c48e8a9ad75d1c0d204e.json
    > cwd: ~\codingProjects\Finance
12:19:54.790 [debug] Kernel process 24272.
12:19:55.233 [debug] End refreshing Kernel Picker (1728037193093)
12:19:55.707 [debug] Kernel output 24272: To connect another client to this kernel, use:
--existing c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v3097bbc7e3a16088d8397c48e8a9ad75d1c0d204e.json
12:19:55.846 [debug] Waiting for Raw Session to be ready in postStartRawSession
12:19:55.846 [debug] Waiting for Raw session to be ready, status: connected
12:19:55.846 [trace] Raw session connected
12:19:55.847 [debug] Waited for Raw session to be ready & got status: connected
12:19:55.847 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
12:19:55.847 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
12:19:55.847 [debug] Sending request for kernelInfo
12:19:55.952 [debug] KernelProcess Exited 24272, Exit Code - 3221225477 
12:19:55.953 [error] Disposing session as kernel process died ExitCode: 3221225477, Reason: 
12:19:55.953 [debug] Dispose Kernel process 24272.
12:19:55.955 [error] Failed to request kernel info [Canceled: Canceled
	at gh.value (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:181:24587)
	at T.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:732)
	at T.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:950)
	at vh.cancel (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:3232)
	at wt.cancel (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:3643)
	at L_.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:11705)
	at T.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:732)
	at T.C (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:802)
	at T.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:1019)
	at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44443)
	at ChildProcess.emit (node:events:531:35)
	at ChildProcess._handle.onexit (node:internal/child_process:294:12)]
12:19:55.956 [warn] Failed to shutdown kernel, .jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.c:\Users\~\codingProjects\Finance\env_fin\Scripts\python.exe.-m#ipykernel_launcher [TypeError: Failed to parse URL from /api/kernels/e115187d-869f-4d2c-a01a-4fd37c720a0b?1728037195956
	at new Request (node:internal/deps/undici/undici:9271:19)
	at Object.t [as handleRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:2054)
	at Object.t [as makeRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:730)
	at Object.Vl [as shutdownKernel] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:5781)
	at n.shutdown (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:89571)
	at L_.start (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:12333)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async U_.startKernel (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:21270)
	at async Ay.create (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:23577)
	at async n_.createJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:285:35993)
	at async n_.startJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:285:34001)
	at async n.wrapKernelMethodImpl (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:82604)] {
  [cause]: [TypeError: Invalid URL
  	at new URL (node:internal/url:797:36)
  	at new Request (node:internal/deps/undici/undici:9269:25)
  	at Object.t [as handleRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:2054)
  	at Object.t [as makeRequest] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:730)
  	at Object.Vl [as shutdownKernel] (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:5781)
  	at n.shutdown (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\node_modules\@jupyterlab\services\lib\kernel\nonSerializingKernel.js:11:89571)
  	at L_.start (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:12333)
  	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  	at async U_.startKernel (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:21270)
  	at async Ay.create (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:23577)
  	at async n_.createJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:285:35993)
  	at async n_.startJupyterSession (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:285:34001)
  	at async n.wrapKernelMethodImpl (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:82604)] {
    code: 'ERR_INVALID_URL',
    input: '/api/kernels/e115187d-869f-4d2c-a01a-4fd37c720a0b?1728037195956'
  }
}
12:19:55.958 [debug] Disposed Kernel process 24272.
12:19:55.960 [error] Failed to connect raw kernel session: Error: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
12:19:55.962 [warn] Error occurred while trying to start the kernel, options.disableUI=false [Ll [Error]: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
	at L_.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:11641)
	at T.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:732)
	at T.C (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:802)
	at T.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:1019)
	at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44443)
	at ChildProcess.emit (node:events:531:35)
	at ChildProcess._handle.onexit (node:internal/child_process:294:12)] {
  category: 'kerneldied',
  isJupyterError: true,
  kernelConnectionMetadata: n {
    kind: 'startUsingPythonInterpreter',
    kernelSpec: id {
      specFile: 'c:\\Users\\~\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-toolsai.jupyter\\version-2024.9.1\\jupyter\\kernels\\python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b\\kernel.json',
      interpreterPath: 'c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe',
      isRegisteredByVSC: 'registeredByNewVersionOfExt',
      name: 'python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b',
      argv: [Array],
      language: 'python',
      executable: 'python',
      display_name: 'env_fin',
      metadata: [Object],
      env: {},
      interrupt_mode: undefined
    },
    interpreter: {
      id: 'C:\\USERS\\~\\CODINGPROJECTS\\FINANCE\\ENV_FIN\\SCRIPTS\\PYTHON.EXE',
      uri: [ta]
    },
    id: '.jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.-m#ipykernel_launcher'
  },
  exitCode: 3221225477,
  stdErr: ''
}
12:19:55.962 [warn] Kernel Error, context = start [Ll [Error]: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
	at L_.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:11641)
	at T.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:732)
	at T.C (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:802)
	at T.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:1019)
	at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44443)
	at ChildProcess.emit (node:events:531:35)
	at ChildProcess._handle.onexit (node:internal/child_process:294:12)] {
  category: 'kerneldied',
  isJupyterError: true,
  kernelConnectionMetadata: n {
    kind: 'startUsingPythonInterpreter',
    kernelSpec: id {
      specFile: 'c:\\Users\\~\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-toolsai.jupyter\\version-2024.9.1\\jupyter\\kernels\\python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b\\kernel.json',
      interpreterPath: 'c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe',
      isRegisteredByVSC: 'registeredByNewVersionOfExt',
      name: 'python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b',
      argv: [Array],
      language: 'python',
      executable: 'python',
      display_name: 'env_fin',
      metadata: [Object],
      env: {},
      interrupt_mode: undefined
    },
    interpreter: {
      id: 'C:\\USERS\\~\\CODINGPROJECTS\\FINANCE\\ENV_FIN\\SCRIPTS\\PYTHON.EXE',
      uri: [ta]
    },
    id: '.jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.-m#ipykernel_launcher'
  },
  exitCode: 3221225477,
  stdErr: ''
}
12:19:55.965 [debug] Get Custom Env Variables, Class name = Cm, completed in 0ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance", Arg 2: "RunPythonCode"
12:19:55.965 [debug] Got env vars from Python Ext in 1ms for ~\codingProjects\Finance\env_fin\Scripts\python.exe, with env var count 67.
12:19:55.965 [trace] Prepend PATH with python bin for ~\codingProjects\Finance\env_fin\Scripts\python.exe
12:19:55.965 [debug] Getting activated env variables, Class name = gd, completed in 1ms, has a truthy return value, Arg 1: "/c:/Users/~/codingProjects/Finance", Arg 2: "~\\CODINGPROJECTS\\FINANCE\\ENV_FIN\\SCRIPTS\\PYTHON.EXE", Arg 3: undefined
12:19:55.972 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
12:19:56.316 [debug] Checking if product is installed, Class name = Ux, completed in 352ms, has a truthy return value, Arg 1: 19, Arg 2: undefined, Return Value: true
12:19:56.316 [debug] Are Dependencies Installed, Class name = zd, completed in 352ms, has a truthy return value, Arg 1: "~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.-m#ipykernel_launcher", Arg 2: undefined, Arg 3: true, Return Value: true
12:19:56.321 [info] Dispose Kernel '~\codingProjects\Finance\test.ipynb' associated with '~\codingProjects\Finance\test.ipynb'
12:19:56.321 [debug] Kernel got disposed, hence there is no longer a kernel associated with ~\codingProjects\Finance\test.ipynb
12:19:56.322 [error] Error in notebook cell execution [Ll [Error]: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
	at L_.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:11641)
	at T.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:732)
	at T.C (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:802)
	at T.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:1019)
	at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44443)
	at ChildProcess.emit (node:events:531:35)
	at ChildProcess._handle.onexit (node:internal/child_process:294:12)] {
  category: 'kerneldied',
  isJupyterError: true,
  kernelConnectionMetadata: n {
    kind: 'startUsingPythonInterpreter',
    kernelSpec: id {
      specFile: 'c:\\Users\\~\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-toolsai.jupyter\\version-2024.9.1\\jupyter\\kernels\\python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b\\kernel.json',
      interpreterPath: 'c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe',
      isRegisteredByVSC: 'registeredByNewVersionOfExt',
      name: 'python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b',
      argv: [Array],
      language: 'python',
      executable: 'python',
      display_name: 'env_fin',
      metadata: [Object],
      env: {},
      interrupt_mode: undefined
    },
    interpreter: {
      id: 'C:\\USERS\\~\\CODINGPROJECTS\\FINANCE\\ENV_FIN\\SCRIPTS\\PYTHON.EXE',
      uri: [ta]
    },
    id: '.jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.-m#ipykernel_launcher'
  },
  exitCode: 3221225477,
  stdErr: ''
}
12:19:56.323 [trace] Start cell 0 execution @ undefined (clear output)
12:19:56.324 [error] Error in execution (get message for cell) [Ll [Error]: The kernel died. Error: ... View Jupyter [log](command:jupyter.viewOutput) for further details.
	at L_.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:304:11641)
	at T.B (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:732)
	at T.C (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:802)
	at T.fire (file:///c:/Users/~/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:1019)
	at ChildProcess.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.9.1-win32-x64\dist\extension.node.js:299:44443)
	at ChildProcess.emit (node:events:531:35)
	at ChildProcess._handle.onexit (node:internal/child_process:294:12)] {
  category: 'kerneldied',
  isJupyterError: true,
  kernelConnectionMetadata: n {
    kind: 'startUsingPythonInterpreter',
    kernelSpec: id {
      specFile: 'c:\\Users\\~\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-toolsai.jupyter\\version-2024.9.1\\jupyter\\kernels\\python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b\\kernel.json',
      interpreterPath: 'c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe',
      isRegisteredByVSC: 'registeredByNewVersionOfExt',
      name: 'python385jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b',
      argv: [Array],
      language: 'python',
      executable: 'python',
      display_name: 'env_fin',
      metadata: [Object],
      env: {},
      interrupt_mode: undefined
    },
    interpreter: {
      id: 'C:\\USERS\\~\\CODINGPROJECTS\\FINANCE\\ENV_FIN\\SCRIPTS\\PYTHON.EXE',
      uri: [ta]
    },
    id: '.jvsc74a57bd020429ee65a24c99876d5830e97ab2ff4af0af5f75ce9d959172a0d27192cba5b.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.-m#ipykernel_launcher'
  },
  exitCode: 3221225477,
  stdErr: ''
}
12:19:56.332 [info] Process Execution: ~\codingProjects\Finance\env_fin\Scripts\python.exe -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
12:19:56.667 [debug] Checking if product is installed, Class name = Ux, completed in 340ms, has a truthy return value, Arg 1: 19, Arg 2: undefined, Return Value: true
12:19:56.667 [debug] Are Dependencies Installed, Class name = zd, completed in 341ms, has a truthy return value, Arg 1: "~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.c:\\Users\\~\\codingProjects\\Finance\\env_fin\\Scripts\\python.exe.-m#ipykernel_launcher", Arg 2: undefined, Arg 3: true, Return Value: true
12:19:56.685 [trace] Cell 0 completed in 0s (start: undefined, end: undefined)

@DonJayamanne
Copy link
Contributor Author

@Philipp-Ro
Thanks for the logs, does this issue repro when using another Python environment or different version.
E.g. Python 3.10 or later

@Philipp-Ro
Copy link

@DonJayamanne
I created a new virtuell enviroment with a newer python version 3.8.5 -> 3.12.7 this solved the issue =). I looked up andall enviroments with version 3.10 or later are working just as you said.
Wow thank you for the great help !!

@DonJayamanne
Copy link
Contributor Author

Thanks for getting back

Given that it works for other environments, I’m closing this issue as it’s not caused by the extension

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

3 participants