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

Disposing session as kernel process died ExitCode: 3221225725 #16287

Open
1 of 2 tasks
yao24247 opened this issue Dec 11, 2024 · 6 comments
Open
1 of 2 tasks

Disposing session as kernel process died ExitCode: 3221225725 #16287

yao24247 opened this issue Dec 11, 2024 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language

Comments

@yao24247
Copy link

Applies To

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

What happened?

The Jupyter kernel crashes whenever I type a dot (.) following pd.DataFrame() or pd.Series()!

VS Code Version

1.95.3

Jupyter Extension Version

2024.10.0

Jupyter logs

Visual Studio Code (1.95.3, undefined, desktop)
Jupyter Extension Version: 2024.10.0.
Python Extension Version: 2024.20.0.
Pylance Extension Version: 2024.12.1.
Platform: win32 (x64).
Temp Storage folder ~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2024.10.0
Workspace folder ~\Desktop\codetest, Home = c:\Users\weaver
23:07:26.098 [debug] Start refreshing Kernel Picker (1733843246098)
23:07:26.125 [trace] Preferred Remote kernel for ~\Desktop\codetest\test.ipynb is undefined
23:07:26.158 [trace] No controller, hence notebook communications cannot be initialized for editor ~\Desktop\codetest\test.ipynb
23:07:26.158 [debug] Start refreshing Interpreter Kernel Picker
23:07:26.699 [trace] Search for KernelSpecs in Interpreter d:\ProgramData\Anaconda3\python.exe
23:07:26.699 [trace] Search for KernelSpecs in Interpreter d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\python.exe
23:07:26.699 [trace] Search for KernelSpecs in Interpreter d:\ProgramData\Anaconda3\envs\fenicsx-env\python.exe
23:07:26.700 [trace] Search for KernelSpecs in Interpreter d:\ProgramData\Anaconda3\envs\py310\python.exe
23:07:26.700 [trace] Search for KernelSpecs in Interpreter d:\ProgramData\Anaconda3\envs\py311\python.exe
23:07:26.700 [trace] Search for KernelSpecs in Interpreter d:\ProgramData\Anaconda3\envs\py312\python.exe
23:07:26.700 [trace] Search for KernelSpecs in Interpreter d:\ProgramData\Anaconda3\envs\py312_DL\python.exe
23:07:26.700 [trace] Search for KernelSpecs in Interpreter d:\ProgramData\Anaconda3\envs\py313\python.exe
23:07:26.720 [debug] Get Custom Env Variables, Class name = Em, completed in 622ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
23:07:26.720 [debug] Jupyter Paths kernels: 
23:07:26.721 [trace] Kernel fenicsx-env matches d:\PROGRAMDATA\ANACONDA3\ENVS\FENICSX-ENV\PYTHON.EXE based on argv.
23:07:26.721 [trace] Kernel undefined.-xfrozen_modules=off matches d:\PROGRAMDATA\ANACONDA3\ENVS\PY312_DL\PYTHON.EXE based on argv.
23:07:26.721 [trace] Kernel py310 matches d:\PROGRAMDATA\ANACONDA3\ENVS\PY310\PYTHON.EXE based on argv.
23:07:26.722 [trace] Kernel py311 matches d:\PROGRAMDATA\ANACONDA3\ENVS\PY311\PYTHON.EXE based on argv.
23:07:26.722 [trace] Kernel undefined.-xfrozen_modules=off matches d:\PROGRAMDATA\ANACONDA3\ENVS\PY312\PYTHON.EXE based on argv.
23:07:26.722 [trace] Kernel undefined.-xfrozen_modules=off matches d:\PROGRAMDATA\ANACONDA3\ENVS\PY313\PYTHON.EXE based on argv.
23:07:26.725 [debug] Kernel Spec Root Paths, ~\AppData\Roaming\jupyter\kernels, c:\ProgramData\jupyter\kernels
23:07:26.733 [error] Failed to validate Password info [D [FetchError]: request to http://localhost:8778/notebooks/E:/%E7%94%A8%E6%88%B7/GIS/%E5%B0%8F%E8%AE%BA%E6%96%87/2023.05%E5%AE%81%E5%A4%8F%E5%9C%B0%E4%B8%8B%E6%B0%B4/GIS%E5%A4%84%E7%90%86.ipynb/ failed, reason: 
	at ClientRequest.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\node-fetch.js:1:306417)
	at ClientRequest.emit (node:events:519:28)
	at emitErrorEvent (node:_http_client:101:11)
	at Socket.socketErrorListener (node:_http_client:504:5)
	at Socket.emit (node:events:519:28)
	at emitErrorNT (node:internal/streams/destroy:169:8)
	at emitErrorCloseNT (node:internal/streams/destroy:128:3)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}
23:07:27.106 [error] Error fetching kernels from http://localhost:8778/notebooks/E:/用户/GIS/小论文/2023.05宁夏地下水/GIS处理.ipynb (localhost): [FetchError: request to http://localhost:8778/notebooks/E:/%E7%94%A8%E6%88%B7/GIS/%E5%B0%8F%E8%AE%BA%E6%96%87/2023.05%E5%AE%81%E5%A4%8F%E5%9C%B0%E4%B8%8B%E6%B0%B4/GIS%E5%A4%84%E7%90%86.ipynb/api/kernels?1733843246753 failed, reason: 
	at ClientRequest.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\node-fetch.js:1:306417)
	at ClientRequest.emit (node:events:519:28)
	at emitErrorEvent (node:_http_client:101:11)
	at Socket.socketErrorListener (node:_http_client:504:5)
	at Socket.emit (node:events:519:28)
	at emitErrorNT (node:internal/streams/destroy:169:8)
	at emitErrorCloseNT (node:internal/streams/destroy:128:3)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)]
23:07:27.106 [trace] Disposing Jupyter Lab Helper
23:07:27.106 [trace] SessionManager - dispose contents manager
23:07:27.107 [trace] ShutdownSessionAndConnection - dispose session manager
23:07:27.108 [trace] Finished disposing Jupyter Lab Helper
23:07:27.108 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at i.dispose (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\@jupyterlab\services.js:11:35855)
	at Kr.dispose (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\@jupyterlab\services.js:11:75419)
	at c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\extension.node.js:181:17985
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)]
23:07:27.153 [debug] KernelProvider switched kernel to id = .jvsc74a57bd0e2fd1a852522f4beac4f7293d90080bfa2ac6b4d4ed570765f628c70b4631bed.d:\ProgramData\Anaconda3\envs\py311\python.exe.d:\ProgramData\Anaconda3\envs\py311\python.exe.-m#ipykernel_launcher
23:07:27.154 [debug] start the kernel, options.disableUI=true for ~\Desktop\codetest\test.ipynb
23:07:27.158 [trace] Registering commtarget jupyter.widget
23:07:27.159 [debug] Controller selection change completed
23:07:27.238 [debug] Get Custom Env Variables, Class name = Em, completed in 0ms, has a truthy return value, Arg 1: "/C:/Users/~/Desktop/codetest", Arg 2: "RunPythonCode"
23:07:27.239 [info] Starting Kernel (Python Path: d:\ProgramData\Anaconda3\envs\py311\python.exe, Conda, 3.11.10) for '~\Desktop\codetest\test.ipynb' (disableUI=true)
23:07:27.239 [trace] Creating raw notebook for resource '~\Desktop\codetest\test.ipynb'
23:07:27.246 [error] Failed to validate Password info [D [FetchError]: request to http://localhost:8778/notebooks/E:/%E7%94%A8%E6%88%B7/GIS/%E5%B0%8F%E8%AE%BA%E6%96%87/2023.05%E5%AE%81%E5%A4%8F%E5%9C%B0%E4%B8%8B%E6%B0%B4/GIS%E5%A4%84%E7%90%86.ipynb/ failed, reason: 
	at ClientRequest.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\node-fetch.js:1:306417)
	at ClientRequest.emit (node:events:519:28)
	at emitErrorEvent (node:_http_client:101:11)
	at Socket.socketErrorListener (node:_http_client:504:5)
	at Socket.emit (node:events:519:28)
	at emitErrorNT (node:internal/streams/destroy:169:8)
	at emitErrorCloseNT (node:internal/streams/destroy:128:3)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}
23:07:27.279 [debug] Get Custom Env Variables, Class name = Em, completed in 0ms, has a truthy return value, Arg 1: "/c:/Users/~/Desktop/codetest/test.ipynb", Arg 2: "RunPythonCode"
23:07:27.320 [error] Error fetching kernels from http://localhost:8778/notebooks/E:/用户/GIS/小论文/2023.05宁夏地下水/GIS处理.ipynb (localhost): [FetchError: request to http://localhost:8778/notebooks/E:/%E7%94%A8%E6%88%B7/GIS/%E5%B0%8F%E8%AE%BA%E6%96%87/2023.05%E5%AE%81%E5%A4%8F%E5%9C%B0%E4%B8%8B%E6%B0%B4/GIS%E5%A4%84%E7%90%86.ipynb/api/kernels?1733843247247 failed, reason: 
	at ClientRequest.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\node-fetch.js:1:306417)
	at ClientRequest.emit (node:events:519:28)
	at emitErrorEvent (node:_http_client:101:11)
	at Socket.socketErrorListener (node:_http_client:504:5)
	at Socket.emit (node:events:519:28)
	at emitErrorNT (node:internal/streams/destroy:169:8)
	at emitErrorCloseNT (node:internal/streams/destroy:128:3)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)]
23:07:27.320 [trace] Disposing Jupyter Lab Helper
23:07:27.320 [trace] SessionManager - dispose contents manager
23:07:27.320 [trace] ShutdownSessionAndConnection - dispose session manager
23:07:27.320 [trace] Finished disposing Jupyter Lab Helper
23:07:27.320 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at i.dispose (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\@jupyterlab\services.js:11:35855)
	at Kr.dispose (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\@jupyterlab\services.js:11:75419)
	at c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\extension.node.js:181:17985
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)]
23:07:27.320 [error] UniversalRemoteKernelFinder: Failed to get kernels without cache [FetchError: request to http://localhost:8778/notebooks/E:/%E7%94%A8%E6%88%B7/GIS/%E5%B0%8F%E8%AE%BA%E6%96%87/2023.05%E5%AE%81%E5%A4%8F%E5%9C%B0%E4%B8%8B%E6%B0%B4/GIS%E5%A4%84%E7%90%86.ipynb/api/kernels?1733843247247 failed, reason: 
	at ClientRequest.<anonymous> (c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\dist\node_modules\node-fetch.js:1:306417)
	at ClientRequest.emit (node:events:519:28)
	at emitErrorEvent (node:_http_client:101:11)
	at Socket.socketErrorListener (node:_http_client:504:5)
	at Socket.emit (node:events:519:28)
	at emitErrorNT (node:internal/streams/destroy:169:8)
	at emitErrorCloseNT (node:internal/streams/destroy:128:3)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)]
23:07:27.321 [trace] UniversalRemoteKernelFinder: Writing 0 remote kernel connection metadata to cache
23:07:27.321 [trace] Hiding default KernelSpec d:\ProgramData\Anaconda3\envs\py310\python.exe for interpreter d:\ProgramData\Anaconda3\envs\py310\python.exe (KernelSpec file d:\ProgramData\Anaconda3\envs\py310\share\jupyter\kernels\python3\kernel.json)
23:07:27.321 [trace] Hiding default KernelSpec d:\ProgramData\Anaconda3\python.exe for interpreter d:\ProgramData\Anaconda3\python.exe (KernelSpec file d:\ProgramData\Anaconda3\share\jupyter\kernels\python3\kernel.json)
23:07:27.322 [trace] Hiding default KernelSpec d:\ProgramData\Anaconda3\envs\fenicsx-env\python.exe for interpreter d:\ProgramData\Anaconda3\envs\fenicsx-env\python.exe (KernelSpec file d:\ProgramData\Anaconda3\envs\fenicsx-env\share\jupyter\kernels\python3\kernel.json)
23:07:27.322 [trace] Hiding default KernelSpec d:\ProgramData\Anaconda3\envs\py311\python.exe for interpreter d:\ProgramData\Anaconda3\envs\py311\python.exe (KernelSpec file d:\ProgramData\Anaconda3\envs\py311\share\jupyter\kernels\python3\kernel.json)
23:07:27.324 [trace] Kernels for interpreter D:\PROGRAMDATA\ANACONDA3\ENVS\PY311\PYTHON.EXE are .jvsc74a57bd0e2fd1a852522f4beac4f7293d90080bfa2ac6b4d4ed570765f628c70b4631bed#ir.d:\ProgramData\Anaconda3\envs\py311\python.exe.\.r#--slave#-e#irkernel::main()#--args#{connection_file}, .jvsc74a57bd0e2fd1a852522f4beac4f7293d90080bfa2ac6b4d4ed570765f628c70b4631bed.d:\ProgramData\Anaconda3\envs\py311\python.exe.d:\ProgramData\Anaconda3\envs\py311\python.exe.-m#ipykernel_launcher
23:07:27.326 [trace] Hiding default KernelSpec d:\ProgramData\Anaconda3\envs\py313\python.exe for interpreter d:\ProgramData\Anaconda3\envs\py313\python.exe (KernelSpec file d:\ProgramData\Anaconda3\envs\py313\share\jupyter\kernels\python3\kernel.json)
23:07:27.326 [trace] Hiding default KernelSpec d:\ProgramData\Anaconda3\envs\py312\python.exe for interpreter d:\ProgramData\Anaconda3\envs\py312_DL\python.exe (KernelSpec file d:\ProgramData\Anaconda3\envs\py312_DL\share\jupyter\kernels\python3\kernel.json)
23:07:27.326 [trace] Hiding default KernelSpec d:\ProgramData\Anaconda3\envs\py312\python.exe for interpreter d:\ProgramData\Anaconda3\envs\py312\python.exe (KernelSpec file d:\ProgramData\Anaconda3\envs\py312\share\jupyter\kernels\python3\kernel.json)
23:07:27.326 [trace] Kernels for interpreter D:\PROGRAMDATA\ANACONDA3\ENVS\PY312\PYTHON.EXE are .jvsc74a57bd0faf140ff0f5f9d86cdbc5c76469dd70318756508101fa2855a35ca2a7575f709#ir.d:\ProgramData\Anaconda3\envs\py312\python.exe.\.r#--slave#-e#irkernel::main()#--args#{connection_file}, .jvsc74a57bd0faf140ff0f5f9d86cdbc5c76469dd70318756508101fa2855a35ca2a7575f709.d:\ProgramData\Anaconda3\envs\py312\python.exe.d:\ProgramData\Anaconda3\envs\py312\python.exe.-m#ipykernel_launcher
23:07:27.359 [trace] Hiding default KernelSpec d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\python.exe for interpreter d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\python.exe (KernelSpec file d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\share\jupyter\kernels\python3\kernel.json)
23:07:27.359 [trace] Kernels for interpreter D:\PROGRAM FILES\ARCGIS\PRO\BIN\PYTHON\ENVS\ARCGISPRO_PY3\PYTHON.EXE are .jvsc74a57bd03684f063b6a359112b8354210d934241ec9b32ba13dfc82c4f024b6130247516#xpython.d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\python.exe.d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\python.exe., .jvsc74a57bd03684f063b6a359112b8354210d934241ec9b32ba13dfc82c4f024b6130247516.d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\python.exe.d:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro_py3\python.exe.-m#ipykernel_launcher
23:07:27.365 [debug] Launching kernel .jvsc74a57bd0e2fd1a852522f4beac4f7293d90080bfa2ac6b4d4ed570765f628c70b4631bed.d:\ProgramData\Anaconda3\envs\py311\python.exe.d:\ProgramData\Anaconda3\envs\py311\python.exe.-m#ipykernel_launcher for ~\Desktop\codetest\test.ipynb in ~\Desktop\codetest with ports 9001, 9000, 9004, 9002, 9003
23:07:28.129 [trace] Conda file is conda
23:07:28.682 [debug] Interpreter for Pylance for Notebook URI "~\Desktop\codetest\test.ipynb" is d:\ProgramData\Anaconda3\envs\py311\python.exe
23:07:28.755 [trace] Python API env change detected, update => 'D:\PROGRAMDATA\ANACONDA3\PYTHON.EXE'
23:07:28.755 [trace] Python API env change detected, update => 'D:\PROGRAM FILES\ARCGIS\PRO\BIN\PYTHON\ENVS\ARCGISPRO_PY3\PYTHON.EXE'
23:07:28.755 [trace] Python API env change detected, update => 'D:\PROGRAMDATA\ANACONDA3\ENVS\FENICSX-ENV\PYTHON.EXE'
23:07:28.756 [trace] Python API env change detected, update => 'D:\PROGRAMDATA\ANACONDA3\ENVS\PY310\PYTHON.EXE'
23:07:28.756 [trace] Python API env change detected, update => 'D:\PROGRAMDATA\ANACONDA3\ENVS\PY311\PYTHON.EXE'
23:07:28.756 [trace] Python API env change detected, update => 'D:\PROGRAMDATA\ANACONDA3\ENVS\PY312\PYTHON.EXE'
23:07:28.756 [trace] Python API env change detected, update => 'D:\PROGRAMDATA\ANACONDA3\ENVS\PY312_DL\PYTHON.EXE'
23:07:28.757 [trace] Python API env change detected, update => 'D:\PROGRAMDATA\ANACONDA3\ENVS\PY313\PYTHON.EXE'
23:07:28.758 [debug] Refreshed Environments
23:07:29.759 [debug] End refreshing Kernel Picker (1733843246098)
23:07:30.238 [debug] Got env vars from Python Ext in 3000ms for d:\ProgramData\Anaconda3\envs\py311\python.exe, with env var count 78.
23:07:30.238 [trace] Prepend PATH with python bin for d:\ProgramData\Anaconda3\envs\py311\python.exe
23:07:30.239 [debug] Getting activated env variables, Class name = Id, completed in 3000ms, has a truthy return value, Arg 1: "/C:/Users/~/Desktop/codetest", Arg 2: "D:\\PROGRAMDATA\\ANACONDA3\\ENVS\\PY311\\PYTHON.EXE", Arg 3: undefined
23:07:30.244 [info] Process Execution: d:\ProgramData\Anaconda3\envs\py311\python.exe -m pip list
23:07:30.251 [debug] Got env vars from Python Ext in 2972ms for d:\ProgramData\Anaconda3\envs\py311\python.exe, with env var count 78.
23:07:30.251 [trace] Prepend PATH with python bin for d:\ProgramData\Anaconda3\envs\py311\python.exe
23:07:30.251 [debug] Getting activated env variables, Class name = Id, completed in 2972ms, has a truthy return value, Arg 1: "/c:/Users/~/Desktop/codetest/test.ipynb", Arg 2: "D:\\PROGRAMDATA\\ANACONDA3\\ENVS\\PY311\\PYTHON.EXE", Arg 3: undefined
23:07:30.256 [info] Process Execution: d:\ProgramData\Anaconda3\envs\py311\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
23:07:30.262 [info] Process Execution: d:\ProgramData\Anaconda3\envs\py311\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 12292
    > cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\pythonFiles\vscode_datascience_helpers
23:07:30.337 [trace] Got a response of 1780 for INITIALIZE_INTERRUPT:0
23:07:30.342 [info] Process Execution: d:\ProgramData\Anaconda3\envs\py311\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v37cde88f6d1e642d965dff46138a8cfdf78433c98.json
    > cwd: ~\Desktop\codetest
23:07:30.343 [debug] Kernel process 9896.
23:07:30.477 [trace] ipykernel version & path 6.29.5, d:\ProgramData\Anaconda3\envs\py311\Lib\site-packages\ipykernel\__init__.py for d:\ProgramData\Anaconda3\envs\py311\python.exe
23:07:31.007 [debug] Kernel output 9896: To connect another client to this kernel, use:
--existing c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v37cde88f6d1e642d965dff46138a8cfdf78433c98.json
23:07:31.065 [debug] Waiting for Raw Session to be ready in postStartRawSession
23:07:31.065 [debug] Waiting for Raw session to be ready, status: connected
23:07:31.065 [trace] Raw session connected
23:07:31.065 [debug] Waited for Raw session to be ready & got status: connected
23:07:31.065 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
23:07:31.065 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
23:07:31.065 [debug] Sending request for kernelInfo
23:07:31.178 [trace] Got response for requestKernelInfo
23:07:31.178 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 113ms
23:07:31.179 [trace] Executing silently Code (idle) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
23:07:31.187 [trace] Executing silently Code (completed) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys with 1 output(s)
23:07:31.188 [trace] Started running kernel initialization for ~\Desktop\codetest\test.ipynb
23:07:31.188 [trace] Executing silently Code (idle) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy
23:07:31.229 [trace] Executing silently Code (completed) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy with 1 output(s)
23:07:31.230 [trace] Determined IPyWidgets Version as 8
23:07:31.230 [trace] Version of IPyWidgets 8 determined after 4.072s
23:07:31.230 [trace] Executing silently Code (idle) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None):
23:07:31.239 [trace] Executing silently Code (completed) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None): with 0 output(s)
23:07:31.239 [debug] Requesting Kernel info
23:07:31.240 [trace] Got Kernel info
23:07:31.240 [trace] End running kernel initialization, now waiting for idle
23:07:31.240 [trace] Waiting for idle on (kernel): db455c40-1981-48f2-b825-7d58c043e746 -> idle
23:07:31.240 [trace] Finished waiting for idle on (kernel): db455c40-1981-48f2-b825-7d58c043e746 -> idle
23:07:31.240 [trace] End running kernel initialization, session is idle
23:07:31.241 [trace] Registering Kernel Completion Provider from kernel py311 (Python 3.11.10) for language python
23:07:31.241 [trace] IPyWidgetScriptSource.initialize
23:07:31.242 [info] Kernel successfully started
23:07:31.243 [debug] getDataDirsImpl, Class name = Kr (started execution), Arg 1: "/c:/Users/~/Desktop/codetest/test.ipynb", Arg 2: "D:\\PROGRAMDATA\\ANACONDA3\\ENVS\\PY311\\PYTHON.EXE"
23:07:31.244 [debug] Get Custom Env Variables, Class name = Em, completed in 1ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
23:07:31.244 [debug] Jupyter Paths : 
23:07:31.244 [debug] Get Custom Env Variables, Class name = Em, completed in 0ms, has a truthy return value, Arg 1: "/c:/Users/~/Desktop/codetest/test.ipynb", Arg 2: "RunPythonCode"
23:07:31.245 [debug] Got env vars from Python Ext in 1ms for d:\ProgramData\Anaconda3\envs\py311\python.exe, with env var count 78.
23:07:31.245 [trace] Prepend PATH with python bin for d:\ProgramData\Anaconda3\envs\py311\python.exe
23:07:31.245 [debug] Getting activated env variables, Class name = Id, completed in 1ms, has a truthy return value, Arg 1: "/c:/Users/~/Desktop/codetest/test.ipynb", Arg 2: "D:\\PROGRAMDATA\\ANACONDA3\\ENVS\\PY311\\PYTHON.EXE", Arg 3: undefined
23:07:31.255 [info] Process Execution: d:\ProgramData\Anaconda3\envs\py311\python.exe c:\Users\~\.vscode\extensions\ms-toolsai.jupyter-2024.10.0-win32-x64\pythonFiles\printJupyterDataDir.py
23:07:31.307 [debug] getDataDirsImpl, Class name = Kr, completed in 64ms, has a truthy return value, Arg 1: "/c:/Users/~/Desktop/codetest/test.ipynb", Arg 2: "D:\\PROGRAMDATA\\ANACONDA3\\ENVS\\PY311\\PYTHON.EXE", Return Value: <Uri:/C:/Users/~/AppData/Roaming/jupyter>, <Uri:/D:/ProgramData/Anaconda3/envs/py311/share/jupyter>, <Uri:/C:/ProgramData/jupyter>
23:07:31.763 [trace] Web view is ready to receive widget messages
23:07:31.765 [trace] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
23:07:31.766 [trace] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
23:07:31.775 [trace] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter
23:07:31.775 [trace] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
23:07:31.775 [trace] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
23:07:31.775 [trace] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter
23:07:31.775 [trace] Widget Message: Received IPyWidget scripts [{"moduleName":"jupyter-matplotlib","scriptUri":"https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter/nbextensions/jupyter-matplotlib/index","source":"local"}]
23:07:31.775 [trace] Widget Message: Source for IPyWidget jupyter-matplotlib found in local @ https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter/nbextensions/jupyter-matplotlib/index.
23:07:31.775 [trace] Widget Message: Registering IPyWidget jupyter-matplotlib found in https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter/nbextensions/jupyter-matplotlib/index.
23:07:31.775 [trace] Widget Message: Received IPyWidget scripts [{"moduleName":"jupyterlab-plotly","scriptUri":"https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter/nbextensions/jupyterlab-plotly/index","source":"local"}]
23:07:31.775 [trace] Widget Message: Source for IPyWidget jupyterlab-plotly found in local @ https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter/nbextensions/jupyterlab-plotly/index.
23:07:31.775 [trace] Widget Message: Registering IPyWidget jupyterlab-plotly found in https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.10.0-win32-x64/temp/scripts/95035c8b1e253d7d4b05d6fe57344b073a2dc57a1c6a38a0b0aeb9ada4a3a581/jupyter/nbextensions/jupyterlab-plotly/index.
23:07:35.999 [debug] Jupyter completion time: 10
23:07:36.002 [debug] Execution of code ms-toolsai.jupyter-1 completed in 12ms
23:07:38.535 [debug] Execution of code ms-toolsai.jupyter-2 completed in 7ms
23:07:38.584 [debug] Jupyter completion time: 56
23:07:39.670 [debug] Jupyter completion time: 8
23:07:39.672 [debug] Execution of code ms-toolsai.jupyter-3 completed in 10ms
23:07:39.758 [trace] Inspecting code import pandas as
23:07:39.765 [debug] Inspected code import pandas as in 7ms
23:07:39.766 [debug] Execution of code ms-toolsai.jupyter-4 completed in 8ms
23:07:40.220 [debug] Execution of code ms-toolsai.jupyter-5 completed in 14ms
23:07:40.220 [debug] Jupyter completion time: 15
23:07:40.223 [trace] Inspecting code import pandas as pass
23:07:40.231 [debug] Inspected code import pandas as pass in 8ms
23:07:40.232 [debug] Execution of code ms-toolsai.jupyter-6 completed in 9ms
23:07:40.389 [debug] Jupyter completion time: 12
23:07:40.390 [debug] Execution of code ms-toolsai.jupyter-7 completed in 12ms
23:07:40.987 [debug] Handle Execution of Cells 1 for ~\Desktop\codetest\test.ipynb
23:07:40.988 [trace] Execute Notebook ~\Desktop\codetest\test.ipynb. Step 1
23:07:40.988 [trace] Connect to Kernel ~\Desktop\codetest\test.ipynb. Step 2
23:07:40.988 [trace] Connected to Kernel ~\Desktop\codetest\test.ipynb. Step 3
23:07:40.988 [trace] executeCell 1. Step 4
23:07:40.989 [trace] Cell Index:1 sent to kernel
23:07:40.992 [trace] Start cell 1 execution @ 1733843260992 (clear output)
23:07:40.993 [debug] Kernel acknowledged execution of cell 1 @ 1733843260992
23:07:41.285 [trace] Cell 1 completed in 0.293s (start: 1733843260992, end: 1733843261285)
23:07:41.286 [trace] Cell 1 executed successfully
23:07:44.494 [trace] Queue code ms-toolsai.datawrangler-1 from ms-toolsai.datawrangler after 0ms:

23:07:44.494 [trace] Execution Id:ms-toolsai.datawrangler-1. Start Code execution.
23:07:44.494 [trace] Execution Id:ms-toolsai.datawrangler-1. Send code for execution.
23:07:44.495 [trace] Execution Id:ms-toolsai.datawrangler-1. Execution Request Sent to Kernel.
23:07:44.501 [trace] Execution Id:ms-toolsai.datawrangler-1. Executed successfully.
23:07:44.501 [debug] Execution of code ms-toolsai.datawrangler-1 completed in 7ms
23:07:44.503 [trace] Queue code ms-toolsai.datawrangler-2 from ms-toolsai.datawrangler after 0ms:

def __DW_GET_DF_VARS__():
    # see definition of these in the debug session
    global __DW_LOCALS__
    global __DW_GLOBALS__

    import json
    import builtins
    import sys

    try:
        import IPython
        curr_scope = { **builtins.globals(), **builtins.locals() }
        curr_globals = IPython.get_ipython().user_ns
        hidden_scope = IPython.get_ipython().user_ns_hidden
    except builtins.Exception:
        curr_scope = { **__DW_LOCALS__, **__DW_GLOBALS__ }
        curr_globals = __DW_GLOBALS__
        hidden_scope = {}

    supported_dataframe_types = {
        builtins.list: "list",
        builtins.dict: "dictionary",
    }
    
    if 'numpy' in sys.modules:
        try:
            import numpy as np
            supported_dataframe_types[np.ndarray] = "ndarray"
        except builtins.Exception:
            pass
    
    if 'pandas' in sys.modules:
        try:
            import pandas as pd
            supported_dataframe_types[pd.DataFrame] = "pandas"
            supported_dataframe_types[pd.Series] = "series"
        except builtins.Exception:
            pass
    
    if 'polars' in sys.modules:
        try:
            import polars as pl
            supported_dataframe_types[pl.DataFrame] = "polars"
            supported_dataframe_types[pl.Series] = "polarsSeries"
        except builtins.Exception:
            pass
    
    if 'xarray' in sys.modules:
        try:
            import xarray as xr
            supported_dataframe_types[xr.DataArray] = "dataArray"
        except builtins.Exception:
            pass
    
    if 'tensorflow' in sys.modules:
        try:
            import tensorflow as tf
            supported_dataframe_types[tf.Tensor] = "eagerTensor"
        except builtins.Exception:
            pass
    
    if 'torch' in sys.modules:
        try:
            import torch
            supported_dataframe_types[torch.Tensor] = "tensor"
        except builtins.Exception:
            pass
    
    if 'pyspark' in sys.modules and False:
        try:
            import pyspark
            supported_dataframe_types[pyspark.sql.dataframe.DataFrame] = "pyspark"
        except builtins.Exception:
            pass
        try:
            import pyspark
            supported_dataframe_types[pyspark.sql.connect.dataframe.DataFrame] = "pyspark"
        except builtins.Exception:
            pass
    
    def is_fallback_supported(variable):
        return builtins.hasattr(variable, "to_pandas") or builtins.hasattr(variable, "toPandas") or builtins.hasattr(variable, "__dataframe__") or builtins.type(variable).__name__ in {"DataFrame","list","dict","ndarray","Series","Tensor","EagerTensor","DataArray"}
    
    try:
        # we still need this due to https://github.com/ipython/ipykernel/issues/795
        import IPython
        capture_output = IPython.utils.capture.capture_output
    except Exception:
        class capture_output():
            def __init__(self):
                import io
                self.stdoutio = io.StringIO()
                self.stderrio = io.StringIO()
            @property
            def stdout(self):
                return self.stdoutio.getvalue()
            @property
            def stderr(self):
                return self.stderrio.getvalue()
            def __enter__(self):
                from contextlib import redirect_stdout, redirect_stderr
                self.redirect_stdout = redirect_stdout(self.stdoutio)
                self.redirect_stderr = redirect_stderr(self.stderrio)
                self.redirect_stdout.__enter__(),
                self.redirect_stderr.__enter__()
                return self
            def __exit__(self, *args, **kwargs):
                result_stdout = self.redirect_stdout.__exit__(*args, **kwargs)
                result_stderr = self.redirect_stderr.__exit__(*args, **kwargs)
                return result_stdout and result_stderr

    with capture_output():
        def is_local(k):
            return k not in curr_globals or curr_scope[k] is not curr_globals[k]
        def valid_keys(k):
            # see https://github.com/ipython/ipython/blob/main/IPython/core/magics/namespace.py#L275
            return not k.startswith('_') and not (k in hidden_scope and not is_local(k))

        variables = builtins.sorted(builtins.filter(valid_keys, curr_scope.keys()))
        dataframe_vars = {d: curr_scope[d] for d in variables}
        dataframes_with_metadata = []
        for v in variables:
            df_type = builtins.type(dataframe_vars[v])
            if df_type not in supported_dataframe_types and not is_fallback_supported(dataframe_vars[v]):
                continue
            dtype = supported_dataframe_types[df_type] if df_type in supported_dataframe_types else "unknown"
            dataframes_with_metadata.append({
                "variableName": v,
                "type": dtype,
                "supportedEngines": ["pandas"],
                "isLocalVariable": is_local(v),
                "rawType": ".".join([df_type.__module__, df_type.__name__])
            })
    
    builtins.print(json.dumps(dataframes_with_metadata))

try:
    __DW_GET_DF_VARS__()
finally:
    del __DW_GET_DF_VARS__
23:07:44.503 [trace] Execution Id:ms-toolsai.datawrangler-2. Start Code execution.
23:07:44.503 [trace] Execution Id:ms-toolsai.datawrangler-2. Send code for execution.
23:07:44.503 [trace] Execution Id:ms-toolsai.datawrangler-2. Execution Request Sent to Kernel.
23:07:44.517 [trace] Execution Id:ms-toolsai.datawrangler-2. Executed successfully.
23:07:44.517 [debug] Execution of code ms-toolsai.datawrangler-2 completed in 14ms
23:07:44.525 [trace] Queue code ms-toolsai.datawrangler-3 from ms-toolsai.datawrangler after 0ms:

23:07:44.525 [trace] Execution Id:ms-toolsai.datawrangler-3. Start Code execution.
23:07:44.525 [trace] Execution Id:ms-toolsai.datawrangler-3. Send code for execution.
23:07:44.525 [trace] Execution Id:ms-toolsai.datawrangler-3. Execution Request Sent to Kernel.
23:07:44.529 [trace] Execution Id:ms-toolsai.datawrangler-3. Executed successfully.
23:07:44.530 [debug] Execution of code ms-toolsai.datawrangler-3 completed in 5ms
23:07:44.568 [debug] Jupyter completion time: 8
23:07:44.569 [debug] Execution of code ms-toolsai.jupyter-8 completed in 9ms
23:07:44.633 [trace] Queue code ms-toolsai.datawrangler-4 from ms-toolsai.datawrangler after 0ms:

23:07:44.633 [trace] Execution Id:ms-toolsai.datawrangler-4. Start Code execution.
23:07:44.633 [trace] Execution Id:ms-toolsai.datawrangler-4. Send code for execution.
23:07:44.633 [trace] Execution Id:ms-toolsai.datawrangler-4. Execution Request Sent to Kernel.
23:07:44.638 [trace] Execution Id:ms-toolsai.datawrangler-4. Executed successfully.
23:07:44.638 [debug] Execution of code ms-toolsai.datawrangler-4 completed in 5ms
23:07:44.644 [trace] Queue code ms-toolsai.datawrangler-5 from ms-toolsai.datawrangler after 0ms:

23:07:44.644 [trace] Execution Id:ms-toolsai.datawrangler-5. Start Code execution.
23:07:44.644 [trace] Execution Id:ms-toolsai.datawrangler-5. Send code for execution.
23:07:44.644 [trace] Execution Id:ms-toolsai.datawrangler-5. Execution Request Sent to Kernel.
23:07:44.648 [trace] Execution Id:ms-toolsai.datawrangler-5. Executed successfully.
23:07:44.648 [debug] Execution of code ms-toolsai.datawrangler-5 completed in 4ms
23:07:44.882 [debug] Execution of code ms-toolsai.jupyter-9 completed in 10ms
23:07:44.882 [debug] Jupyter completion time: 10
23:07:45.110 [trace] Inspecting code pd.ArrowDtype
23:07:45.140 [debug] Inspected code pd.ArrowDtype in 30ms
23:07:45.146 [debug] Execution of code ms-toolsai.jupyter-10 completed in 36ms
23:07:45.279 [trace] Inspecting code pd.DataFrame
23:07:45.287 [debug] Inspected code pd.DataFrame in 8ms
23:07:45.289 [debug] Execution of code ms-toolsai.jupyter-11 completed in 10ms
23:07:49.689 [debug] KernelProcess Exited 9896, Exit Code - 3221225725 
23:07:49.689 [error] Disposing session as kernel process died ExitCode: 3221225725, Reason: 
23:07:49.689 [debug] Dispose Kernel process 9896.
23:07:49.692 [debug] Disposed Kernel process 9896.
23:07:49.693 [trace] Start cell 1 execution @ 1733843260992
23:07:49.723 [trace] Cell 1 completed in -1733843260.992s (start: 1733843260992, end: undefined)
23:07:49.768 [debug] Code execution cancelled by extension ms-toolsai.jupyter
23:07:49.768 [debug] Code execution cancelled by extension ms-toolsai.jupyter
23:07:49.768 [debug] Jupyter completion time: 108

Coding Language and Runtime Version

Python v3.10.15 or Python v3.11.10

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

None

@yao24247 yao24247 added the bug Issue identified by VS Code Team member as probable bug label Dec 11, 2024
@yao24247
Copy link
Author

QQ20241210-23427.mp4

@DonJayamanne
Copy link
Contributor

Please can you disable the datawrangler extension and see if this issue repros?

@DonJayamanne DonJayamanne added the notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) label Dec 11, 2024
@yao24247
Copy link
Author

Please can you disable the datawrangler extension and see if this issue repros?

This issue still occurs when I disable the DataWrangler.

@yao24247
Copy link
Author

If I import pandas but haven't run the code yet, Pylance takes about 3-5 seconds to show suggestions after typing a dot (.) following pd.DataFrame() or pd.Series(). But, the jupyter kernel still crashes when I disable the Pylance.

@DonJayamanne
Copy link
Contributor

Please can you try to disable the following setting (i.e. un-tick it)
let me know if that works.
Image

@yao24247
Copy link
Author

Please can you try to disable the following setting (i.e. un-tick it)
let me know if that works.

Great! This issue has been resolved. It works well. Thank you!

@DonJayamanne DonJayamanne added notebook-intellisense Intellisense & other language features in notebook cells for any language and removed notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) labels Dec 17, 2024
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 notebook-intellisense Intellisense & other language features in notebook cells for any language
Projects
None yet
Development

No branches or pull requests

2 participants