microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.27k stars 280 forks source link

Execution of cells blocked due to variable viewer #15297

Open pietro1000 opened 6 months ago

pietro1000 commented 6 months ago

Applies To

What happened?

When I run my script in the interactive window, the first few cells execute normally, but subsequent cells do not run. The Jupyter output acknowledges that the cell has been sent to the kernel but never starts execution. At the same time, the Jupyter output is filled with the following message repeated multiple times: *[debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, args): # Query Jupyter server for the info**

VS Code Version

Visual Studio Code (1.87.0, undefined, desktop)

Jupyter Extension Version

Jupyter Extension Version: 2024.2.0.

Jupyter logs

Visual Studio Code (1.87.0, undefined, desktop)
Jupyter Extension Version: 2024.2.0.
Python Extension Version: 2024.2.1.
Pylance Extension Version: 2024.2.3.
Platform: darwin (arm64).
Workspace folder ~/Dropbox/Cornell/insurance holdings/data - 2023, Home = /Users/pietro
17:21:45.897 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: undefined, Arg 2: "RunPythonCode"
17:21:45.898 [info] Start refreshing Kernel Picker (1709677305898)
17:21:45.904 [info] Using Pylance
17:21:45.935 [debug] Get Custom Env Variables, Class name = Rm, completed in 38ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
17:21:45.935 [debug] Jupyter Paths /kernels: 
17:21:45.935 [debug] Kernel Spec Root Paths, /usr/share/jupyter/kernels, /usr/local/share/jupyter/kernels, ~/Library/Jupyter/kernels
17:21:45.938 [debug] Search for KernelSpecs in Interpreter /usr/bin/python3
17:21:45.938 [debug] Finding Global Python KernelSpecs
17:21:45.939 [warn] No interpreter with path ~/opt/anaconda3/bin/python found in Python API, will convert Uri path to string as Id ~/opt/anaconda3/bin/python
17:21:45.940 [warn] No interpreter with path ~/opt/anaconda3/envs/XCS224N_MAC/bin/python found in Python API, will convert Uri path to string as Id ~/opt/anaconda3/envs/XCS224N_MAC/bin/python
17:21:45.940 [warn] No interpreter with path ~/opt/anaconda3/envs/test_env/bin/python found in Python API, will convert Uri path to string as Id ~/opt/anaconda3/envs/test_env/bin/python
17:21:45.942 [debug] Search for KernelSpecs in Interpreter ~/anaconda3/bin/python
17:21:45.943 [debug] Search for KernelSpecs in Interpreter ~/opt/anaconda3/envs/XCS224N/bin/python
17:21:45.945 [debug] Search for KernelSpecs in Interpreter ~/opt/anaconda3/envs/ap_env/bin/python
17:21:45.947 [debug] Search for KernelSpecs in Interpreter ~/opt/anaconda3/envs/rl_env/bin/python
17:21:45.951 [debug] Search for KernelSpecs in Interpreter ~/anaconda3/envs/apenv_MPS/bin/python
17:21:45.953 [debug] Search for KernelSpecs in Interpreter /opt/homebrew/Caskroom/miniforge/base/bin/python
17:21:45.956 [debug] Search for KernelSpecs in Interpreter ~/anaconda3/envs/insurance/bin/python
17:21:45.959 [debug] Search for KernelSpecs in Interpreter ~/anaconda3/envs/test_env/bin/python
17:21:45.963 [debug] Search for KernelSpecs in Interpreter ~/anaconda3/envs/mps_env/bin/python
17:21:45.967 [debug] Search for KernelSpecs in Interpreter ~/anaconda3/envs/insurance_quant/bin/python
17:21:45.975 [debug] Full interpreter list is length: 12, /usr/bin/python3::Unknown:/usr/bin/python3, ~/anaconda3/bin/python:base:Conda:~/anaconda3/bin/python, ~/opt/anaconda3/envs/XCS224N/bin/python::Conda:~/opt/anaconda3/envs/XCS224N/bin/python, ~/opt/anaconda3/envs/ap_env/bin/python::Conda:~/opt/anaconda3/envs/ap_env/bin/python, ~/opt/anaconda3/envs/rl_env/bin/python::Conda:~/opt/anaconda3/envs/rl_env/bin/python, ~/anaconda3/envs/apenv_MPS/bin/python:apenv_MPS:Conda:~/anaconda3/envs/apenv_MPS/bin/python, /opt/homebrew/Caskroom/miniforge/base/bin/python:base:Conda:/opt/homebrew/Caskroom/miniforge/base/bin/python, ~/anaconda3/envs/insurance/bin/python:insurance:Conda:~/anaconda3/envs/insurance/bin/python, ~/anaconda3/envs/test_env/bin/python:test_env:Conda:~/anaconda3/envs/test_env/bin/python, ~/anaconda3/envs/mps_env/bin/python:mps_env:Conda:~/anaconda3/envs/mps_env/bin/python, ~/anaconda3/envs/mps_env/bin/python:mps_env:Conda:~/anaconda3/envs/mps_env/bin/python, ~/anaconda3/envs/insurance_quant/bin/python:insurance_quant:Conda:~/anaconda3/envs/insurance_quant/bin/python
17:21:45.976 [debug] Getting activated env variables, Class name = yp (started execution), Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023", Arg 2: "~/anaconda3/envs/insurance/bin/python", Arg 3: undefined
17:21:45.976 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023", Arg 2: "RunPythonCode"
17:21:45.976 [debug] Get Custom Env Variables, Class name = Rm, completed in 0ms, has a truthy return value, Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023", Arg 2: "RunPythonCode"
17:21:46.154 [debug] Kernels for interpreter /usr/bin/python3 are .jvsc74a57bd031f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6./usr/bin/python3./usr/bin/python3.-m#ipykernel_launcher
17:21:46.157 [debug] Kernels for interpreter /opt/homebrew/Caskroom/miniforge/base/bin/python are .jvsc74a57bd0c6e4e9f98eb68ad3b7c296f83d20e6de614cb42e90992a65aa266555a3137d0d./opt/homebrew/Caskroom/miniforge/base/python./opt/homebrew/Caskroom/miniforge/base/python.-m#ipykernel_launcher
17:21:46.184 [debug] Loading kernelspec from ~/Library/Jupyter/kernels/ap_env/kernel.json 
17:21:46.184 [debug] Loading kernelspec from ~/Library/Jupyter/kernels/base/kernel.json 
17:21:46.184 [debug] Loading kernelspec from ~/Library/Jupyter/kernels/rl_env/kernel.json 
17:21:46.184 [debug] Loading kernelspec from ~/Library/Jupyter/kernels/test_env/kernel.json 
17:21:46.184 [debug] Loading kernelspec from ~/Library/Jupyter/kernels/xcs224n_mac/kernel.json 
17:21:46.184 [debug] Loading kernelspec from ~/Library/Jupyter/kernels/xcs224n/kernel.json 
17:21:46.188 [debug] Loading kernelspec from ~/opt/anaconda3/envs/XCS224N/share/jupyter/kernels/python3/kernel.json for ~/opt/anaconda3/envs/XCS224N/bin/python
17:21:46.188 [debug] Loading kernelspec from ~/anaconda3/share/jupyter/kernels/python3/kernel.json for ~/anaconda3/bin/python
17:21:46.188 [debug] Loading kernelspec from ~/opt/anaconda3/envs/rl_env/share/jupyter/kernels/python3/kernel.json for ~/opt/anaconda3/envs/rl_env/bin/python
17:21:46.188 [debug] Loading kernelspec from ~/opt/anaconda3/envs/ap_env/share/jupyter/kernels/python3/kernel.json for ~/opt/anaconda3/envs/ap_env/bin/python
17:21:46.188 [debug] Loading kernelspec from ~/anaconda3/envs/apenv_MPS/share/jupyter/kernels/python3/kernel.json for ~/anaconda3/envs/apenv_MPS/bin/python
17:21:46.188 [debug] Loading kernelspec from ~/anaconda3/envs/test_env/share/jupyter/kernels/python3/kernel.json for ~/anaconda3/envs/test_env/bin/python
17:21:46.188 [debug] Loading kernelspec from ~/anaconda3/envs/insurance/share/jupyter/kernels/python3/kernel.json for ~/anaconda3/envs/insurance/bin/python
17:21:46.189 [debug] Loading kernelspec from ~/anaconda3/envs/insurance_quant/share/jupyter/kernels/python3/kernel.json for ~/anaconda3/envs/insurance_quant/bin/python
17:21:46.189 [debug] Loading kernelspec from ~/anaconda3/envs/mps_env/share/jupyter/kernels/python3/kernel.json for ~/anaconda3/envs/mps_env/bin/python
17:21:46.300 [debug] creating new code watcher with matching document file://~/Dropbox/Cornell/insurance%20holdings/data%20-%202023/codes/6B_weights_20240304.py
17:21:46.357 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3916jvsc74a57bd023bdcbcefc934dfe69983f0c7df3dc57ff17d195649bda66364f6428b4fe7993', ~/opt/anaconda3/envs/rl_env/bin/python for interpreter ~/opt/anaconda3/envs/rl_env/bin/python and spec ~/opt/anaconda3/envs/rl_env/share/jupyter/kernels/python3/kernel.json
17:21:46.357 [debug] Kernels for interpreter ~/opt/anaconda3/envs/rl_env/bin/python are .jvsc74a57bd023bdcbcefc934dfe69983f0c7df3dc57ff17d195649bda66364f6428b4fe7993.~/opt/anaconda3/envs/rl_env/python.~/opt/anaconda3/envs/rl_env/python.-m#ipykernel_launcher
17:21:46.358 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3816jvsc74a57bd08312df2c8bbbde0291f201f87b9941663600fa338039fb5847929143bd80724a', ~/opt/anaconda3/envs/XCS224N/bin/python for interpreter ~/opt/anaconda3/envs/XCS224N/bin/python and spec ~/opt/anaconda3/envs/XCS224N/share/jupyter/kernels/python3/kernel.json
17:21:46.358 [debug] Kernels for interpreter ~/opt/anaconda3/envs/XCS224N/bin/python are .jvsc74a57bd08312df2c8bbbde0291f201f87b9941663600fa338039fb5847929143bd80724a.~/opt/anaconda3/envs/XCS224N/python.~/opt/anaconda3/envs/XCS224N/python.-m#ipykernel_launcher
17:21:46.358 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3114jvsc74a57bd0542238ec44c35636042ce97683d77280b46c3a630492e0e6cbfd243d3e7c4cbe', ~/anaconda3/bin/python for interpreter ~/anaconda3/bin/python and spec ~/anaconda3/share/jupyter/kernels/python3/kernel.json
17:21:46.358 [debug] Kernels for interpreter ~/anaconda3/bin/python are .jvsc74a57bd0542238ec44c35636042ce97683d77280b46c3a630492e0e6cbfd243d3e7c4cbe.~/anaconda3/python.~/anaconda3/python.-m#ipykernel_launcher
17:21:46.358 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3916jvsc74a57bd0543949b80c79a1e8c0254461769a7e4eed4e8439ee16309e104e5c4dcbc438fc', ~/opt/anaconda3/envs/ap_env/bin/python for interpreter ~/opt/anaconda3/envs/ap_env/bin/python and spec ~/opt/anaconda3/envs/ap_env/share/jupyter/kernels/python3/kernel.json
17:21:46.358 [debug] Kernels for interpreter ~/opt/anaconda3/envs/ap_env/bin/python are .jvsc74a57bd0543949b80c79a1e8c0254461769a7e4eed4e8439ee16309e104e5c4dcbc438fc.~/opt/anaconda3/envs/ap_env/python.~/opt/anaconda3/envs/ap_env/python.-m#ipykernel_launcher
17:21:46.358 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3918jvsc74a57bd0d0e18151e95e23f1835839219fb8bb03fdc0eca2e1ee2c76ced867841fadaac7', ~/anaconda3/envs/apenv_MPS/bin/python for interpreter ~/anaconda3/envs/apenv_MPS/bin/python and spec ~/anaconda3/envs/apenv_MPS/share/jupyter/kernels/python3/kernel.json
17:21:46.359 [debug] Kernels for interpreter ~/anaconda3/envs/apenv_MPS/bin/python are .jvsc74a57bd0d0e18151e95e23f1835839219fb8bb03fdc0eca2e1ee2c76ced867841fadaac7.~/anaconda3/envs/apenv_MPS/python.~/anaconda3/envs/apenv_MPS/python.-m#ipykernel_launcher
17:21:46.359 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3918jvsc74a57bd056ced0f84cd932c524064ef756ac60f3c3529a050aadaf72d1d7cd6d6e80d296', ~/anaconda3/envs/test_env/bin/python for interpreter ~/anaconda3/envs/test_env/bin/python and spec ~/anaconda3/envs/test_env/share/jupyter/kernels/python3/kernel.json
17:21:46.359 [debug] Kernels for interpreter ~/anaconda3/envs/test_env/bin/python are .jvsc74a57bd056ced0f84cd932c524064ef756ac60f3c3529a050aadaf72d1d7cd6d6e80d296.~/anaconda3/envs/test_env/python.~/anaconda3/envs/test_env/python.-m#ipykernel_launcher
17:21:46.359 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3918jvsc74a57bd0781382444f7e6de4f70eb98cafa2f33a2ab1aa7e94b8aea32a152433c56a74c6', ~/anaconda3/envs/insurance/bin/python for interpreter ~/anaconda3/envs/insurance/bin/python and spec ~/anaconda3/envs/insurance/share/jupyter/kernels/python3/kernel.json
17:21:46.359 [debug] Kernels for interpreter ~/anaconda3/envs/insurance/bin/python are .jvsc74a57bd0781382444f7e6de4f70eb98cafa2f33a2ab1aa7e94b8aea32a152433c56a74c6.~/anaconda3/envs/insurance/python.~/anaconda3/envs/insurance/python.-m#ipykernel_launcher
17:21:46.359 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3918jvsc74a57bd05eb47c1207cdf30eef9942cb72135fdfb5fa8f258573d5f6b1ce5f8a5c18ff4f', ~/anaconda3/envs/insurance_quant/bin/python for interpreter ~/anaconda3/envs/insurance_quant/bin/python and spec ~/anaconda3/envs/insurance_quant/share/jupyter/kernels/python3/kernel.json
17:21:46.359 [debug] Kernels for interpreter ~/anaconda3/envs/insurance_quant/bin/python are .jvsc74a57bd05eb47c1207cdf30eef9942cb72135fdfb5fa8f258573d5f6b1ce5f8a5c18ff4f.~/anaconda3/envs/insurance_quant/python.~/anaconda3/envs/insurance_quant/python.-m#ipykernel_launcher
17:21:46.359 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python31013jvsc74a57bd0685bb1e1d585b6d3ea810b2afa91035df27837cf8642ccfbfae427c7b77c8387', ~/anaconda3/envs/mps_env/bin/python for interpreter ~/anaconda3/envs/mps_env/bin/python and spec ~/anaconda3/envs/mps_env/share/jupyter/kernels/python3/kernel.json
17:21:46.360 [debug] Kernels for interpreter ~/anaconda3/envs/mps_env/bin/python are .jvsc74a57bd0685bb1e1d585b6d3ea810b2afa91035df27837cf8642ccfbfae427c7b77c8387.~/anaconda3/envs/mps_env/python.~/anaconda3/envs/mps_env/python.-m#ipykernel_launcher
17:21:48.477 [warn] Kernel Spec for 'XCS224N_MAC' (~/Library/Jupyter/kernels/xcs224n_mac/kernel.json) hidden, as we cannot find a matching interpreter argv = '~/opt/anaconda3/envs/XCS224N_MAC/bin/python'. To resolve this, please change '~/opt/anaconda3/envs/XCS224N_MAC/bin/python' to point to the fully qualified Python executable.
17:21:48.478 [warn] Kernel Spec for 'Python (base)' (~/Library/Jupyter/kernels/base/kernel.json) hidden, as we cannot find a matching interpreter argv = '~/opt/anaconda3/bin/python'. To resolve this, please change '~/opt/anaconda3/bin/python' to point to the fully qualified Python executable.
17:21:48.479 [warn] Kernel Spec for 'test_env' (~/Library/Jupyter/kernels/test_env/kernel.json) hidden, as we cannot find a matching interpreter argv = '~/opt/anaconda3/envs/test_env/bin/python'. To resolve this, please change '~/opt/anaconda3/envs/test_env/bin/python' to point to the fully qualified Python executable.
17:21:48.514 [info] End refreshing Kernel Picker (1709677305898)
17:21:50.657 [debug] Conda file returned by Python Extension is conda
17:21:51.482 [debug] Got env vars with python ~/anaconda3/envs/insurance/bin/python, with env var count 48 in 5506ms. 
    PATH value is ~/anaconda3/envs/insurance/bin:~/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin and 
    Path value is undefined
17:21:51.482 [debug] Prepend PATH with python bin for ~/anaconda3/envs/insurance/bin/python
17:21:51.482 [debug] Activated Env Variables for ~/anaconda3/envs/insurance/bin/python, 
    PATH value is ~/anaconda3/envs/insurance/bin:~/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin and 
    Path value is undefined
17:21:51.482 [debug] Getting activated env variables, Class name = yp, completed in 5506ms, has a truthy return value, Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023", Arg 2: "~/anaconda3/envs/insurance/bin/python", Arg 3: undefined
17:21:51.483 [info] Process Execution: ~/anaconda3/envs/insurance/bin/python -m pip list
17:22:27.254 [info] Starting interactive window for resource '~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py' with controller '.jvsc74a57bd0781382444f7e6de4f70eb98cafa2f33a2ab1aa7e94b8aea32a152433c56a74c6.~/anaconda3/envs/insurance/python.~/anaconda3/envs/insurance/python.-m#ipykernel_launcher (Interactive)'
17:22:27.307 [info] Start refreshing Interpreter Kernel Picker
17:22:27.307 [info] Start refreshing Kernel Picker (1709677347307)
17:22:27.311 [debug] No controller, hence notebook communications cannot be initialized for editor /Interactive-1.interactive
17:22:27.323 [debug] Initialize notebook communications for editor /Interactive-1.interactive
17:22:27.323 [debug] Resolving notebook UI Comms (resolve) for /Interactive-1.interactive
17:22:27.323 [debug] initialize CommonMessageCoordinator
17:22:27.328 [debug] IPyWidgetMessageDispatcher.initialize
17:22:27.328 [debug] Attempting to determine version of IPyWidgets
17:22:27.328 [debug] Controller selection change completed
17:22:27.394 [debug] Interactive Window Editor Created: untitled:/Interactive-1.interactive with input box: vscode-interactive-input:/InteractiveInput-1
17:22:27.397 [debug] start the kernel, options.disableUI=false for /Interactive-1.interactive
17:22:27.397 [debug] Waiting for IPyWidgets version
17:22:27.397 [debug] Waiting for IPyWidgets version promise
17:22:27.398 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd0781382444f7e6de4f70eb98cafa2f33a2ab1aa7e94b8aea32a152433c56a74c6.~/anaconda3/envs/insurance/python.~/anaconda3/envs/insurance/python.-m#ipykernel_launcher  (Python Path: ~/anaconda3/envs/insurance/bin/python, Conda, insurance, 3.9.18) for '/Interactive-1.interactive' (disableUI=false)
17:22:27.399 [debug] Creating raw notebook for resource '~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py'
17:22:27.406 [debug] Getting activated env variables, Class name = yp (started execution), Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py", Arg 2: "~/anaconda3/envs/insurance/bin/python", Arg 3: undefined
17:22:27.406 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py", Arg 2: "RunPythonCode"
17:22:27.406 [debug] Get Custom Env Variables, Class name = Rm, completed in 0ms, has a truthy return value, Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py", Arg 2: "RunPythonCode"
17:22:27.406 [debug] Got env vars with python ~/anaconda3/envs/insurance/bin/python, with env var count 48 in 0ms. 
    PATH value is ~/anaconda3/envs/insurance/bin:~/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin and 
    Path value is undefined
17:22:27.406 [debug] Prepend PATH with python bin for ~/anaconda3/envs/insurance/bin/python
17:22:27.406 [debug] Activated Env Variables for ~/anaconda3/envs/insurance/bin/python, 
    PATH value is ~/anaconda3/envs/insurance/bin:~/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin and 
    Path value is undefined
17:22:27.406 [debug] Getting activated env variables, Class name = yp, completed in 0ms, has a truthy return value, Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py", Arg 2: "~/anaconda3/envs/insurance/bin/python", Arg 3: undefined
17:22:27.407 [info] Process Execution: ~/anaconda3/envs/insurance/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
17:22:27.420 [debug] Launching kernel .jvsc74a57bd0781382444f7e6de4f70eb98cafa2f33a2ab1aa7e94b8aea32a152433c56a74c6.~/anaconda3/envs/insurance/python.~/anaconda3/envs/insurance/python.-m#ipykernel_launcher for ~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py in ~/Dropbox/Cornell/insurance holdings/data - 2023/codes with ports 9001, 9000, 9004, 9002, 9003
17:22:27.421 [debug] Kernel Env Variables for ~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-arm64/temp/jupyter/kernels/python3918jvsc74a57bd0781382444f7e6de4f70eb98cafa2f33a2ab1aa7e94b8aea32a152433c56a74c6/kernel.json, PATH value is ~/anaconda3/envs/insurance/bin:~/anaconda3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
17:22:27.422 [info] Process Execution: ~/anaconda3/envs/insurance/bin/python -m ipykernel_launcher --f=~/Library/Jupyter/runtime/kernel-v2-1438YbbCclx2VLJH.json
    > cwd: ~/Dropbox/Cornell/insurance holdings/data - 2023/codes
17:22:27.422 [info] Kernel process 2106.
17:22:27.433 [debug] Attempting to determine version of IPyWidgets
17:22:27.433 [debug] Waiting for IPyWidgets version
17:22:27.433 [debug] Waiting for IPyWidgets version promise
17:22:28.038 [debug] ipykernel version & path 6.28.0, ~/anaconda3/envs/insurance/lib/python3.9/site-packages/ipykernel/__init__.py for ~/anaconda3/envs/insurance/bin/python
17:22:28.628 [debug] Kernel output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049

To connect another client to this kernel, use:
    --existing kernel-v2-1438YbbCclx2VLJH.json

17:22:28.659 [debug] Waiting for Raw Session to be ready in postStartRawSession
17:22:28.659 [debug] Waiting for Raw session to be ready, status: connected
17:22:28.659 [debug] Raw session connected
17:22:28.659 [debug] Waiting for Raw session to be ready
17:22:28.660 [debug] Waited for Raw session to be ready & got status: connected
17:22:28.660 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
17:22:28.660 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
17:22:28.660 [debug] Sending request for kernelInfo
17:22:28.702 [debug] Got response for requestKernelInfo
17:22:28.702 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 42ms
17:22:28.703 [debug] Executing silently Code (idle) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
17:22:28.711 [debug] Executing silently Code (completed) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys with 1 output(s)
17:22:28.711 [debug] End sendTelemetryForPythonKernelExecutable after 8ms
17:22:28.711 [debug] Started running kernel initialization for /Interactive-1.interactive
17:22:28.712 [debug] Executing silently Code (idle) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy
17:22:28.756 [debug] Executing silently Code (completed) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy with 1 output(s)
17:22:28.756 [debug] Determined IPyWidgets Version as 8
17:22:28.756 [debug] Version of IPyWidgets 8 determined after 1.428s
17:22:28.756 [debug] Version of IPyWidgets 8 determined after 1.323s
17:22:28.757 [debug] Executing silently Code (idle) = import types as _VSCODE_types\nimport os\nimport hashlib as _VSCODE_hashlib\nfrom IPython import get_ip
17:22:28.774 [debug] Executing silently Code (completed) = import types as _VSCODE_types\nimport os\nimport hashlib as _VSCODE_hashlib\nfrom IPython import get_ip with 1 output(s)
17:22:28.774 [debug] Requesting Kernel info
17:22:28.775 [debug] Got Kernel info
17:22:28.775 [debug] End running kernel initialization, now waiting for idle
17:22:28.775 [debug] Waiting for idle on (kernel): e8db641f-6c60-45c7-a217-02b2cfa09c2c -> idle
17:22:28.775 [debug] Finished waiting for idle on (kernel): e8db641f-6c60-45c7-a217-02b2cfa09c2c -> idle
17:22:28.775 [debug] End running kernel initialization, session is idle
17:22:28.776 [info] Registering Kernel Completion Provider from kernel insurance (Python 3.9.18) for language python
17:22:28.777 [debug] IPyWidgetScriptSource.initialize
17:22:28.777 [debug] Registering commtarget jupyter.widget
17:22:28.777 [debug] IPyWidgetMessageDispatcher.initialize
17:22:28.778 [debug] getDataDirsImpl, Class name = Fr (started execution), Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py", Arg 2: "~/anaconda3/envs/insurance/bin/python"
17:22:28.779 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: undefined, Arg 2: "RunPythonCode"
17:22:28.779 [debug] Get Custom Env Variables, Class name = Rm, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
17:22:28.779 [debug] Jupyter Paths : 
17:22:28.779 [debug] Initializing __file__ in setFileInKernel with file://~/Dropbox/Cornell/insurance%20holdings/data%20-%202023/codes/6B_weights_20240304.py for mode perFile
17:22:28.781 [debug] Executing silently Code (idle) = __file__ = '~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.p
17:22:28.781 [info] Process Execution: ~/anaconda3/envs/insurance/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-arm64/pythonFiles/printJupyterDataDir.py
17:22:28.782 [info] Generated code for 1 = <ipython-input-1-e7d1624574e1> with 52 lines
17:22:28.786 [debug] Executing silently Code (completed) = __file__ = '~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.p with 0 output(s)
17:22:28.789 [debug] Cell Index:1 sent to kernel
17:22:28.797 [debug] Start cell 1 execution @ 1709677348797 (clear output)
17:22:28.797 [info] Kernel acknowledged execution of cell 1 @ 1709677348797
17:22:28.798 [warn] Got a non-existent Jupyter Data Dir file://~/.local/share/jupyter
17:22:28.798 [debug] getDataDirsImpl, Class name = Fr, completed in 20ms, has a truthy return value, Arg 1: "~/Dropbox/Cornell/insurance holdings/data - 2023/codes/6B_weights_20240304.py", Arg 2: "~/anaconda3/envs/insurance/bin/python", Return Value: <Uri:~/Library/Jupyter>, <Uri:~/anaconda3/envs/insurance/share/jupyter>, <Uri:/usr/local/share/jupyter>, <Uri:/usr/share/jupyter>
17:22:28.894 [debug] Full interpreter list is length: 12, /usr/bin/python3::Unknown:/usr/bin/python3, ~/anaconda3/bin/python:base:Conda:~/anaconda3/bin/python, ~/opt/anaconda3/envs/XCS224N/bin/python::Conda:~/opt/anaconda3/envs/XCS224N/bin/python, ~/opt/anaconda3/envs/ap_env/bin/python::Conda:~/opt/anaconda3/envs/ap_env/bin/python, ~/opt/anaconda3/envs/rl_env/bin/python::Conda:~/opt/anaconda3/envs/rl_env/bin/python, ~/anaconda3/envs/apenv_MPS/bin/python:apenv_MPS:Conda:~/anaconda3/envs/apenv_MPS/bin/python, /opt/homebrew/Caskroom/miniforge/base/bin/python:base:Conda:/opt/homebrew/Caskroom/miniforge/base/bin/python, ~/anaconda3/envs/insurance/bin/python:insurance:Conda:~/anaconda3/envs/insurance/bin/python, ~/anaconda3/envs/test_env/bin/python:test_env:Conda:~/anaconda3/envs/test_env/bin/python, ~/anaconda3/envs/mps_env/bin/python:mps_env:Conda:~/anaconda3/envs/mps_env/bin/python, ~/anaconda3/envs/mps_env/bin/python:mps_env:Conda:~/anaconda3/envs/mps_env/bin/python, ~/anaconda3/envs/insurance_quant/bin/python:insurance_quant:Conda:~/anaconda3/envs/insurance_quant/bin/python
17:22:28.894 [debug] Refreshed Environments
17:22:29.326 [debug] IPyWidgetMessageDispatcher.initialize
17:22:29.327 [debug] Web view is ready to receive widget messages
17:22:29.336 [debug] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
17:22:29.336 [debug] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
17:22:29.340 [debug] IPyWidgetMessageDispatcher.initialize
17:22:29.340 [debug] IPyWidgetMessageDispatcher.initialize
17:22:29.348 [debug] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-arm64/temp/scripts/120f3d3e554943f3cbc3c2597be1af8a8ebcddeb7fc8fc86d6650b2f67b81778/jupyter
17:22:29.349 [debug] Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
17:22:29.349 [debug] Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
17:22:29.349 [debug] Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-arm64/temp/scripts/120f3d3e554943f3cbc3c2597be1af8a8ebcddeb7fc8fc86d6650b2f67b81778/jupyter
17:22:29.349 [debug] Widget Message: Received IPyWidget scripts [{"moduleName":"jupyterlab-plotly","scriptUri":"https://file%2B.vscode-resource.vscode-cdn.net~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-arm64/temp/scripts/120f3d3e554943f3cbc3c2597be1af8a8ebcddeb7fc8fc86d6650b2f67b81778/jupyter/nbextensions/jupyterlab-plotly/index","source":"local"}]
17:22:29.349 [debug] Widget Message: Source for IPyWidget jupyterlab-plotly found in local @ https://file%2B.vscode-resource.vscode-cdn.net~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-arm64/temp/scripts/120f3d3e554943f3cbc3c2597be1af8a8ebcddeb7fc8fc86d6650b2f67b81778/jupyter/nbextensions/jupyterlab-plotly/index.
17:22:29.349 [debug] Widget Message: Registering IPyWidget jupyterlab-plotly found in https://file%2B.vscode-resource.vscode-cdn.net~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-arm64/temp/scripts/120f3d3e554943f3cbc3c2597be1af8a8ebcddeb7fc8fc86d6650b2f67b81778/jupyter/nbextensions/jupyterlab-plotly/index.
17:22:29.899 [info] End refreshing Kernel Picker (1709677347307)
17:23:12.435 [info] End cell 1 execution after 43.637s, completed @ 1709677392434, started @ 1709677348797
17:23:12.435 [debug] Cell 1 executed successfully
17:23:25.301 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:25.326 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:23:29.516 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:29.546 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:23:30.675 [info] Generated code for 2 = <ipython-input-2-80f765278e1b> with 127 lines
17:23:30.692 [debug] Cell Index:2 sent to kernel
17:23:32.166 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:41.393 [debug] Start cell 2 execution @ 1709677421393 (clear output)
17:23:41.393 [info] Kernel acknowledged execution of cell 2 @ 1709677421393
17:23:41.394 [info] End cell 2 execution after 0.001s, completed @ 1709677421394, started @ 1709677421393
17:23:41.394 [debug] Cell 2 executed successfully
17:23:41.415 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:23:48.349 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:48.389 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:23:48.734 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:48.776 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:23:49.071 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:49.111 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:23:56.771 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:56.809 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:23:57.108 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:23:57.150 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:24:04.580 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:04.581 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:04.602 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:24:04.622 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:24:07.873 [info] Generated code for 3 = <ipython-input-3-580a1d29c2ff> with 9 lines
17:24:07.882 [debug] Cell Index:3 sent to kernel
17:24:09.141 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:09.144 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:09.145 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:10.357 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:10.358 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:10.361 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:11.781 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:27.011 [debug] Start cell 3 execution @ 1709677467011 (clear output)
17:24:27.011 [info] Kernel acknowledged execution of cell 3 @ 1709677467011
17:25:05.711 [info] End cell 3 execution after 38.7s, completed @ 1709677505711, started @ 1709677467011
17:25:05.711 [debug] Cell 3 executed successfully
17:25:05.732 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.753 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.774 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.794 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.815 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.836 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.858 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.912 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:05.916 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:05.920 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:05.923 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:05.926 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:05.930 [debug] Executing silently Code (idle) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:05.946 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.960 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.974 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:05.987 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:06.013 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:06.015 [debug] Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a with 1 output(s)
17:25:11.247 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:11.248 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:25:17.616 [info] Generated code for 4 = <ipython-input-4-51c3feeeec8b> with 1 lines
17:25:17.619 [debug] Cell Index:4 sent to kernel

Coding Language and Runtime Version

Python 3.9.18

Language Extension Version (if applicable)

Python Extension Version: 2024.2.1.

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

DonJayamanne commented 6 months ago

@pietro1000 Please can you hide the variable viewer and see if this makes a difference. The Jupyter variables viewer is either displayed on your left (Debugger Panel) or on the bottom Panel. You can optionally hide/collapse both side bar and the output panels. This should make a difference. Please let me know.

DonJayamanne commented 6 months ago

Based on the following logs Cell 3 was sent at 17:24:07 & the kernel received the cell at 17:24:27 Looks like the kernel is busy.

17:24:07.873 [info] Generated code for 3 = <ipython-input-3-580a1d29c2ff> with 9 lines
17:24:07.882 [debug] Cell Index:3 sent to kernel
17:24:09.141 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:09.144 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:09.145 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:10.357 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:10.358 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:10.361 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:11.781 [debug] Executing silently Code (busy) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info a
17:24:27.011 [debug] Start cell 3 execution @ 1709677467011 (clear output)
17:24:27.011 [info] Kernel acknowledged execution of cell 3 @ 1709677467011
pietro1000 commented 6 months ago

I have hidden the Jupyter variable viewer, and this helps—thank you so much! Is it possible to add back the variables viewer without causing the kernel to get stuck retrieving variables? I do not understand why this happens; the code I am trying to run only uses 5 data frames

amunger commented 6 months ago

You could try the new built-in variable view with the setting "notebook.experimental.variablesView": true - A tree view with the variables should show up in the sidebar debug panel once you execute a cell. I'd be curious to see if that handles your scenario any better.

I'm not sure why it would take so long just to gather the variable info for 5 dataframes though, that is pretty strange. Does it repro for something simple like this:

df1 = pd.DataFrame({"Name": ["Alice", "Bob", "Charlie"],"Age": [25, 30, 35],"Gender": ["F", "M", "M"],})
df2 = pd.DataFrame({"Name": ["Alice", "Bob", "Charlie"],"Age": [25, 30, 35],"Gender": ["F", "M", "M"],})
df3 = pd.DataFrame({"Name": ["Alice", "Bob", "Charlie"],"Age": [25, 30, 35],"Gender": ["F", "M", "M"],})
df4 = pd.DataFrame({"Name": ["Alice", "Bob", "Charlie"],"Age": [25, 30, 35],"Gender": ["F", "M", "M"],})
df5 = pd.DataFrame({"Name": ["Alice", "Bob", "Charlie"],"Age": [25, 30, 35],"Gender": ["F", "M", "M"],})
pietro1000 commented 6 months ago

@amunger, thank you so much for your help!

I've set "notebook.experimental.variablesView": true, and it works well. The variables are displayed in the left panel under "notebook variables" and the code executes without issues. However, I encounter a problem when I click on any of the data frames in the notebook variables panel: the kernel freezes. I suspect the issue arises because the data frames I'm working with are relatively large for Jupyter, despite consuming less than one-third of available RAM.

This issue does not occur with the example you provided or with smaller data frames.

Do you have any suggestions for using the interactive window with large datasets? Are there alternatives to closing the variables viewer or running the code through the Python debugger? Many thanks!

amunger commented 6 months ago

Thanks for the info, very helpful for us to test out the limitations. It sounds like were trying to pass too much data to the context menu. Are you right clicking to try and get to the dataviewer for a dataframe? That isn't implemented yet for the new view.

I don't have a workaround for you currently, but we are trying to improve this area so hopefully it'll be solved soon.

pietro1000 commented 6 months ago

I clicked on the dropdown menu next to the dataframe name out of curiosity to see what information was available. But, doing so caused the kernel to freeze. The screenshot below shows where it got stuck when I clicked on the ">" next to bond_char.

Screenshot 2024-03-06 at 1 02 41 PM

Also, if I leave the variables view from the debugger open without clicking on any variable, the Jupyter log still keeps printing Executing silently Code (completed) = def _VSCODE_getVariable(what_to_get, is_debugging, *args):\n# Query Jupyter server for the info with 1 output(s), but this time it doesn’t seem to interfere with the kernel's execution speed.

I also noticed that with the Jupyter variable viewer open the kernel uses significant CPU even while idle. Switching to the debugger's variables viewer solves this issue.

So the debugger variables viewer definitely helps! Thank you again!