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

HOME environmental variable is overwritten with '/root' #15446

Closed
1 of 2 tasks
BradAF opened this issue Mar 29, 2024 · 2 comments · May be fixed by #15473
Closed
1 of 2 tasks

HOME environmental variable is overwritten with '/root' #15446

BradAF opened this issue Mar 29, 2024 · 2 comments · May be fixed by #15473
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, install ipykernel)

Comments

@BradAF
Copy link

BradAF commented Mar 29, 2024

Applies To

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

What happened?

  1. Created a virtual environment with ipykernel using pipenv where .venv/ is in the project root directory.
  2. In VS Code, defined the python interpreter as .venv/bin/python3.
  3. In VS Code set the Jupyer kernel to the ipykernel in the virtual environment.
  4. Created a python file with import os; os.getenv('HOME') and verified it matched my correct HOME directory.
  5. Created a notebook file, ran a cell with !whoami which showed my correct user name.
  6. In the notebook file, ran a cell with !env and it listed my correct USER env, but the HOME env was set to /root
  7. Added HOME to .env, completely restarted, no change.
  8. In notebook, used os.environ["HOME"] to set my HOME dir, and it updated correctly.
  9. Verified that there were no config or settings files that would otherwise be setting a HOME directory when Jupyer extension loads.
  10. As a workaround, added json "jupyter.runStartupCommands": ["import os;os.environ['HOME'] = '/Users/myuser'"] to VSCode settings.json.

VS Code Version

Version: 1.87.2 Commit: 863d2581ecda6849923a2118d93a088b0745d9d6 Date: 2024-03-08T15:21:31.043Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin x64 23.4.0

Jupyter Extension Version

v2024.2.0

Jupyter logs

Visual Studio Code (1.87.2, undefined, desktop)
Jupyter Extension Version: 2024.2.0.
Python Extension Version: 2024.2.1.
Pylance Extension Version: 2024.3.2.
Platform: darwin (x64).
Multiple Workspace folders opened ~/git/project1, ~/git/project2, ~/git/project3, ~/git/project4, ~/git/project5, ~/git/project6, ~/git/project7
11:17:22.800 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: undefined, Arg 2: "RunPythonCode"
11:17:22.800 [info] Start refreshing Kernel Picker (1711725442800)
11:17:22.814 [info] Using Pylance
11:17:22.912 [debug] Get Custom Env Variables, Class name = Rm, completed in 112ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
11:17:22.912 [debug] Jupyter Paths /kernels: 
11:17:22.912 [debug] Kernel Spec Root Paths, /usr/share/jupyter/kernels, /usr/local/share/jupyter/kernels, ~/Library/Jupyter/kernels
11:17:22.916 [debug] Preferred Remote kernel for ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb is undefined
11:17:22.916 [debug] Preferred Remote kernel for ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment.ipynb is undefined
11:17:23.254 [debug] Search for KernelSpecs in Interpreter /usr/bin/python3
11:17:23.256 [debug] Finding Global Python KernelSpecs
11:17:23.259 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.11.1/bin/python
11:17:23.269 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.10.2/bin/python
11:17:23.278 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.10.3/bin/python
11:17:23.287 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.10.9/bin/python
11:17:23.299 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.11.4/bin/python
11:17:23.311 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.7.13/bin/python
11:17:23.326 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.8.12/bin/python
11:17:23.343 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.9.13/bin/python
11:17:23.360 [debug] Search for KernelSpecs in Interpreter ~/.pyenv/versions/3.9.8/bin/python
11:17:23.378 [debug] Search for KernelSpecs in Interpreter /usr/local/bin/python3
11:17:23.398 [debug] Search for KernelSpecs in Interpreter /usr/local/bin/python3.10
11:17:23.419 [debug] Search for KernelSpecs in Interpreter /usr/local/bin/python3.8
11:17:23.440 [debug] Search for KernelSpecs in Interpreter /usr/local/bin/python3.9
11:17:23.463 [debug] Search for KernelSpecs in Interpreter /usr/local/bin/python3.12
11:17:23.488 [debug] Search for KernelSpecs in Interpreter /usr/local/bin/python3.11
11:17:23.513 [debug] Search for KernelSpecs in Interpreter ~/git/project7/data-science/.venv/bin/python3
11:17:23.564 [debug] Full interpreter list is length: 17, /usr/bin/python3::Unknown:/usr/bin/python3, ~/.pyenv/versions/3.11.1/bin/python::Pyenv:~/.pyenv/versions/3.11.1/bin/python, ~/.pyenv/versions/3.10.2/bin/python::Pyenv:~/.pyenv/versions/3.10.2/bin/python, ~/.pyenv/versions/3.10.3/bin/python::Pyenv:~/.pyenv/versions/3.10.3/bin/python, ~/.pyenv/versions/3.10.9/bin/python::Pyenv:~/.pyenv/versions/3.10.9/bin/python, ~/.pyenv/versions/3.11.4/bin/python::Pyenv:~/.pyenv/versions/3.11.4/bin/python, ~/.pyenv/versions/3.7.13/bin/python::Pyenv:~/.pyenv/versions/3.7.13/bin/python, ~/.pyenv/versions/3.8.12/bin/python::Pyenv:~/.pyenv/versions/3.8.12/bin/python, ~/.pyenv/versions/3.9.13/bin/python::Pyenv:~/.pyenv/versions/3.9.13/bin/python, ~/.pyenv/versions/3.9.8/bin/python::Pyenv:~/.pyenv/versions/3.9.8/bin/python, /usr/local/bin/python3::Unknown:/usr/local/bin/python3, /usr/local/bin/python3.10::Unknown:/usr/local/bin/python3.10, /usr/local/bin/python3.8::Unknown:/usr/local/bin/python3.8, /usr/local/bin/python3.9::Unknown:/usr/local/bin/python3.9, /usr/local/bin/python3.12::Unknown:/usr/local/bin/python3.12, /usr/local/bin/python3.11::Unknown:/usr/local/bin/python3.11, ~/git/project7/data-science/.venv/bin/python3:.venv:PipEnv:~/git/project7/data-science/.venv/bin/python3
11:17:23.566 [debug] Getting activated env variables, Class name = yp (started execution), Arg 1: "~/git/project1", Arg 2: "/usr/local/bin/python3", Arg 3: undefined
11:17:23.566 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: "~/git/project1", Arg 2: "RunPythonCode"
11:17:23.567 [debug] Get Custom Env Variables, Class name = Rm, completed in 1ms, has a truthy return value, Arg 1: "~/git/project1", Arg 2: "RunPythonCode"
11:17:25.339 [debug] Kernels for interpreter /usr/bin/python3 are .jvsc74a57bd031f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6./usr/bin/python3./usr/bin/python3.-m#ipykernel_launcher
11:17:25.340 [debug] Kernels for interpreter ~/.pyenv/versions/3.11.1/bin/python are .jvsc74a57bd0c7e60886829ce637d97961f3a3d796b265e288335346f331fd1d395c742601d5.~/.pyenv/versions/3.11.1/python.~/.pyenv/versions/3.11.1/python.-m#ipykernel_launcher
11:17:25.342 [debug] Kernels for interpreter ~/.pyenv/versions/3.10.2/bin/python are .jvsc74a57bd02e32abb6e0301011ebecd4590643104f7d75f722a9ef1315852bec00dd4eab7e.~/.pyenv/versions/3.10.2/python.~/.pyenv/versions/3.10.2/python.-m#ipykernel_launcher
11:17:25.343 [debug] Kernels for interpreter ~/.pyenv/versions/3.10.3/bin/python are .jvsc74a57bd060f02ce661c43cc6cf0dab79186174f8b7b560d37fb3f3b67ccc497704699463.~/.pyenv/versions/3.10.3/python.~/.pyenv/versions/3.10.3/python.-m#ipykernel_launcher
11:17:25.344 [debug] Kernels for interpreter ~/.pyenv/versions/3.10.9/bin/python are .jvsc74a57bd09e80ce8ccd00f46951112629328ffcac0b969fc745009cef527e632d91327183.~/.pyenv/versions/3.10.9/python.~/.pyenv/versions/3.10.9/python.-m#ipykernel_launcher
11:17:25.345 [debug] Kernels for interpreter ~/.pyenv/versions/3.11.4/bin/python are .jvsc74a57bd09769a1691878085c99924fea3b013a6fcfa0e1ab42bde6d874ef1a5294ee47f2.~/.pyenv/versions/3.11.4/python.~/.pyenv/versions/3.11.4/python.-m#ipykernel_launcher
11:17:25.347 [debug] Kernels for interpreter ~/.pyenv/versions/3.7.13/bin/python are .jvsc74a57bd01780150b6936208fb8354793568fffb259e94242b272cfd26d1d267f290f068b.~/.pyenv/versions/3.7.13/python.~/.pyenv/versions/3.7.13/python.-m#ipykernel_launcher
11:17:25.348 [debug] Kernels for interpreter ~/.pyenv/versions/3.8.12/bin/python are .jvsc74a57bd04111f17849b541b67591566970ea839cd2a352ed4aeed475fdf8c721a23da31b.~/.pyenv/versions/3.8.12/python.~/.pyenv/versions/3.8.12/python.-m#ipykernel_launcher
11:17:25.349 [debug] Kernels for interpreter ~/.pyenv/versions/3.9.13/bin/python are .jvsc74a57bd0f761340daef7183d1265610e1f057d9c39ea8b5002461d4e6659f5f40a4ee667.~/.pyenv/versions/3.9.13/python.~/.pyenv/versions/3.9.13/python.-m#ipykernel_launcher
11:17:25.350 [debug] Kernels for interpreter ~/.pyenv/versions/3.9.8/bin/python are .jvsc74a57bd0213b8f42da66df8eb57803bc14136fef54f67b8ef501dedc866478403a1c57c5.~/.pyenv/versions/3.9.8/python.~/.pyenv/versions/3.9.8/python.-m#ipykernel_launcher
11:17:25.352 [debug] Kernels for interpreter /usr/local/bin/python3 are .jvsc74a57bd0aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49./usr/local/bin/python3./usr/local/bin/python3.-m#ipykernel_launcher
11:17:25.353 [debug] Kernels for interpreter /usr/local/bin/python3.10 are .jvsc74a57bd07e1998ff7f8aa20ada591c520b972326324e5ea05489af9e422744c7c09f6dad./usr/local/bin/python3.10./usr/local/bin/python3.10.-m#ipykernel_launcher
11:17:25.355 [debug] Kernels for interpreter /usr/local/bin/python3.8 are .jvsc74a57bd00adcc2737ebf6a4a119f135174df96668767fca1ef1112612db5ecadf2b6d608./usr/local/bin/python3.8./usr/local/bin/python3.8.-m#ipykernel_launcher
11:17:25.357 [debug] Kernels for interpreter /usr/local/bin/python3.9 are .jvsc74a57bd0397704579725e15f5c7cb49fe5f0341eb7531c82d19f2c29d197e8b64ab5776b./usr/local/bin/python3.9./usr/local/bin/python3.9.-m#ipykernel_launcher
11:17:25.358 [debug] Kernels for interpreter /usr/local/bin/python3.12 are .jvsc74a57bd0f1062708a37074d70712b695aadee582e0b0b9f95f45576b5521424137d05fec./usr/local/bin/python3.12./usr/local/bin/python3.12.-m#ipykernel_launcher
11:17:25.360 [debug] Kernels for interpreter /usr/local/bin/python3.11 are .jvsc74a57bd01a1af0ee75eeea9e2e1ee996c87e7a2b11a0bebd85af04bb136d915cefc0abce./usr/local/bin/python3.11./usr/local/bin/python3.11.-m#ipykernel_launcher
11:17:34.835 [debug] KernelProvider switched kernel to id = .jvsc74a57bd01c704741ad40c5c477695af6fed58041da1002c073379d33ca2973f48478c39d.~/git/project7/data-science/.venv/bin/python3.~/git/project7/data-science/.venv/bin/python3.-m#ipykernel_launcher
11:17:34.835 [debug] start the kernel, options.disableUI=true for ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb
11:17:34.836 [debug] Initialize notebook communications for editor ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb
11:17:34.836 [debug] Resolving notebook UI Comms (resolve) for ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb
11:17:34.837 [debug] initialize CommonMessageCoordinator
11:17:35.016 [debug] Registering commtarget jupyter.widget
11:17:35.016 [debug] IPyWidgetMessageDispatcher.initialize
11:17:35.017 [debug] Attempting to determine version of IPyWidgets
11:17:35.018 [debug] Controller selection change completed
11:17:35.018 [debug] Waiting for IPyWidgets version
11:17:35.018 [debug] Waiting for IPyWidgets version promise
11:17:35.222 [debug] Getting activated env variables, Class name = yp (started execution), Arg 1: "~/git/project1", Arg 2: "~/git/project7/data-science/.venv/bin/python3", Arg 3: undefined
11:17:35.222 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: "~/git/project1", Arg 2: "RunPythonCode"
11:17:35.223 [debug] Get Custom Env Variables, Class name = Rm, completed in 1ms, has a truthy return value, Arg 1: "~/git/project1", Arg 2: "RunPythonCode"
11:17:35.224 [info] Starting Kernel startUsingPythonInterpreter, .jvsc74a57bd01c704741ad40c5c477695af6fed58041da1002c073379d33ca2973f48478c39d.~/git/project7/data-science/.venv/bin/python3.~/git/project7/data-science/.venv/bin/python3.-m#ipykernel_launcher  (Python Path: ~/git/project7/data-science/.venv/bin/python3, PipEnv, .venv, 3.8.18) for '~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb' (disableUI=true)
11:17:35.225 [debug] Creating raw notebook for resource '~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb'
11:17:43.591 [debug] Loading kernelspec from ~/git/project7/data-science/.venv/share/jupyter/kernels/python3/kernel.json for ~/git/project7/data-science/.venv/bin/python3
11:17:44.127 [debug] Getting activated env variables, Class name = yp (started execution), Arg 1: "~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb", Arg 2: "~/git/project7/data-science/.venv/bin/python3", Arg 3: undefined
11:17:44.128 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: "~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb", Arg 2: "RunPythonCode"
11:17:44.129 [debug] Get Custom Env Variables, Class name = Rm, completed in 1ms, has a truthy return value, Arg 1: "~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb", Arg 2: "RunPythonCode"
11:17:45.262 [debug] Hiding default kernel spec 'Python 3 (ipykernel)', 'python3818jvsc74a57bd01c704741ad40c5c477695af6fed58041da1002c073379d33ca2973f48478c39d', /python for interpreter ~/git/project7/data-science/.venv/bin/python3 and spec ~/git/project7/data-science/.venv/share/jupyter/kernels/python3/kernel.json
11:17:45.264 [debug] Kernels for interpreter ~/git/project7/data-science/.venv/bin/python3 are .jvsc74a57bd01c704741ad40c5c477695af6fed58041da1002c073379d33ca2973f48478c39d.~/git/project7/data-science/.venv/bin/python3.~/git/project7/data-science/.venv/bin/python3.-m#ipykernel_launcher
11:17:45.264 [info] End refreshing Kernel Picker (1711725442800)
11:17:45.401 [warn] Failed to get activated env vars for /usr/local/bin/python3 in 21835ms
11:17:45.402 [debug] Create ProcessService, Class name = Tm (started execution), Arg 1: undefined
11:17:45.402 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: undefined, Arg 2: "RunNonPythonCode", Arg 3: undefined
11:17:45.415 [debug] Launching kernel .jvsc74a57bd01c704741ad40c5c477695af6fed58041da1002c073379d33ca2973f48478c39d.~/git/project7/data-science/.venv/bin/python3.~/git/project7/data-science/.venv/bin/python3.-m#ipykernel_launcher for ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb in ~/git/project7/data-science/real-time-endpoint with ports 9001, 9000, 9004, 9002, 9003
11:17:45.460 [debug] Get Custom Env Variables, Class name = Rm, completed in 58ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunNonPythonCode", Arg 3: undefined
11:17:45.460 [debug] Create ProcessService, Class name = Tm, completed in 58ms, has a truthy return value, Arg 1: undefined
11:17:45.465 [info] Process Execution: /usr/local/bin/python3 -c "import site;print("USER_BASE_VALUE");print(site.USER_BASE);print("USER_BASE_VALUE");"
11:17:45.477 [debug] Conda file returned by Python Extension is conda
11:17:45.729 [debug] USER_SITE for /usr/local/bin/python3 is ~/Library/Python/3.12/bin
11:17:45.730 [debug] Prepend PATH with user site path for /usr/local/bin/python3, user site ~/Library/Python/3.12/bin
11:17:45.730 [debug] Prepend PATH with python bin for /usr/local/bin/python3
11:17:45.730 [debug] Activated Env Variables for /usr/local/bin/python3, 
    PATH value is /usr/local/bin:~/Library/Python/3.12/bin:~/.pyenv/shims:~/.pyenv/bin:~/.nvm/versions/node/v19.8.1/bin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/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:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:~/.pyenv/shims:~/.pyenv/bin:~/.nvm/versions/node/v19.8.1/bin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/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:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools and 
    Path value is undefined
11:17:45.730 [debug] Getting activated env variables, Class name = yp, completed in 22164ms, has a truthy return value, Arg 1: "~/git/project1", Arg 2: "/usr/local/bin/python3", Arg 3: undefined
11:17:45.735 [info] Process Execution: /usr/local/bin/python3 -m pip list
11:17:45.740 [debug] Got env vars with python ~/git/project7/data-science/.venv/bin/python3, with env var count 74 in 10518ms. 
    PATH value is ~/git/project7/data-science/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin and 
    Path value is undefined
11:17:45.740 [debug] Prepend PATH with python bin for ~/git/project7/data-science/.venv/bin/python3
11:17:45.740 [debug] Activated Env Variables for ~/git/project7/data-science/.venv/bin/python3, 
    PATH value is ~/git/project7/data-science/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin and 
    Path value is undefined
11:17:45.740 [debug] Getting activated env variables, Class name = yp, completed in 10518ms, has a truthy return value, Arg 1: "~/git/project1", Arg 2: "~/git/project7/data-science/.venv/bin/python3", Arg 3: undefined
11:17:45.743 [info] Process Execution: ~/git/project7/data-science/.venv/bin/python3 -m pip list
11:17:45.745 [debug] Got env vars with python ~/git/project7/data-science/.venv/bin/python3, with env var count 75 in 1617ms. 
    PATH value is ~/git/project7/data-science/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin and 
    Path value is undefined
11:17:45.745 [debug] Prepend PATH with python bin for ~/git/project7/data-science/.venv/bin/python3
11:17:45.745 [debug] Activated Env Variables for ~/git/project7/data-science/.venv/bin/python3, 
    PATH value is ~/git/project7/data-science/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin and 
    Path value is undefined
11:17:45.746 [debug] Getting activated env variables, Class name = yp, completed in 1619ms, has a truthy return value, Arg 1: "~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb", Arg 2: "~/git/project7/data-science/.venv/bin/python3", Arg 3: undefined
11:17:45.749 [info] Process Execution: ~/git/project7/data-science/.venv/bin/python3 -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
11:17:45.749 [debug] Kernel Env Variables for ~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-x64/temp/jupyter/kernels/python3818jvsc74a57bd01c704741ad40c5c477695af6fed58041da1002c073379d33ca2973f48478c39d/kernel.json, PATH value is ~/git/project7/data-science/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
11:17:45.752 [info] Process Execution: ~/git/project7/data-science/.venv/bin/python3 -m ipykernel_launcher --f=~/Library/Jupyter/runtime/kernel-v2-807483kzpLPdBBLOX.json
    > cwd: ~/git/project7/data-science/real-time-endpoint
11:17:45.753 [info] Kernel process 81489.
11:17:46.677 [debug] ipykernel version & path 6.29.3, ~/git/project7/data-science/.venv/lib/python3.8/site-packages/ipykernel/__init__.py for ~/git/project7/data-science/.venv/bin/python3
11:17:48.248 [info] No interpreter for Pylance for Notebook URI "~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment.ipynb"
11:17:48.780 [warn] StdErr from Kernel Process ~/git/project7/data-science/.venv/lib/python3.8/site-packages/IPython/paths.py:69: UserWarning: IPython parent '/root' is not a writable location, using a temp directory.
  warn("IPython parent '{0}' is not a writable location,"
11:17:48.780 [debug] KernelProcess error: ~/git/project7/data-science/.venv/lib/python3.8/site-packages/IPython/paths.py:69: UserWarning: IPython parent '/root' is not a writable location, using a temp directory.
  warn("IPython parent '{0}' is not a writable location,"

11:17:48.893 [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 ~/Library/Jupyter/runtime/kernel-v2-807483kzpLPdBBLOX.json

11:17:49.219 [debug] Waiting for Raw Session to be ready in postStartRawSession
11:17:49.219 [debug] Waiting for Raw session to be ready, status: connected
11:17:49.219 [debug] Raw session connected
11:17:49.219 [debug] Waiting for Raw session to be ready
11:17:49.220 [debug] Waited for Raw session to be ready & got status: connected
11:17:49.220 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
11:17:49.220 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
11:17:49.220 [debug] Sending request for kernelInfo
11:17:49.242 [debug] Got response for requestKernelInfo
11:17:49.242 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 22ms
11:17:49.244 [debug] Executing silently Code (idle) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
11:17:49.259 [debug] Executing silently Code (completed) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys with 1 output(s)
11:17:49.260 [debug] End sendTelemetryForPythonKernelExecutable after 16ms
11:17:49.260 [debug] Started running kernel initialization for ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb
11:17:49.260 [debug] Executing silently Code (idle) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy
11:17:49.273 [debug] Executing silently Code (completed) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy with 0 output(s)
11:17:49.274 [debug] Determined IPyWidgets Version as undefined
11:17:49.278 [debug] Executing silently Code (idle) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None):
11:17:49.320 [debug] Executing silently Code (completed) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None): with 1 output(s)
11:17:49.321 [debug] Executing silently Code (idle) = import os;os.environ['HOME'] = '~'
11:17:49.330 [debug] Executing silently Code (completed) = import os;os.environ['HOME'] = '~' with 0 output(s)
11:17:49.330 [debug] Requesting Kernel info
11:17:49.331 [debug] Got Kernel info
11:17:49.331 [debug] End running kernel initialization, now waiting for idle
11:17:49.332 [debug] Waiting for idle on (kernel): 01804211-2030-439a-804f-c264951ad9e4 -> idle
11:17:49.332 [debug] Finished waiting for idle on (kernel): 01804211-2030-439a-804f-c264951ad9e4 -> idle
11:17:49.332 [debug] End running kernel initialization, session is idle
11:17:49.337 [info] Registering Kernel Completion Provider from kernel .venv (Python 3.8.18) for language python
11:17:49.341 [debug] IPyWidgetScriptSource.initialize
11:17:49.341 [debug] IPyWidgetMessageDispatcher.initialize
11:17:49.344 [debug] getDataDirsImpl, Class name = Fr (started execution), Arg 1: "~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb", Arg 2: "~/git/project7/data-science/.venv/bin/python3"
11:17:49.344 [debug] Get Custom Env Variables, Class name = Rm (started execution), Arg 1: undefined, Arg 2: "RunPythonCode"
11:17:49.346 [debug] Get Custom Env Variables, Class name = Rm, completed in 2ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
11:17:49.346 [debug] Jupyter Paths : 
11:17:49.352 [info] Process Execution: ~/git/project7/data-science/.venv/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2024.2.0-darwin-x64/pythonFiles/printJupyterDataDir.py
11:17:49.487 [warn] Got an empty Jupyter Data Dir from ~/git/project7/data-science/.venv/bin/python3, stderr = undefined
11:17:49.491 [debug] getDataDirsImpl, Class name = Fr, completed in 147ms, has a truthy return value, Arg 1: "~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment-zterm.ipynb", Arg 2: "~/git/project7/data-science/.venv/bin/python3", Return Value: <Uri:~/Library/Jupyter>, <Uri:~/git/project7/data-science/.venv/share/jupyter>, <Uri:/usr/local/share/jupyter>, <Uri:/usr/share/jupyter>
11:17:57.485 [debug] No controller, hence notebook communications cannot be initialized for editor ~/git/project7/data-science/real-time-endpoint/kubernetes-online-endpoints-simple-deployment.ipynb

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@BradAF BradAF added the bug Issue identified by VS Code Team member as probable bug label Mar 29, 2024
@DonJayamanne
Copy link
Contributor

Thank you for filing this issue and sorry you are running into this.
I am unable to replicate this issue.
Please can you

  • Download the attached file
  • Extract it
  • Open VS Code Insiders and select the command Install from VSIX
  • Select the above file
  • When prompted, please reload VS Code
  • Test this once again and share the logs
    This time all of the env variables will be logged, please feel free to strip what you feel is sensitive
    However the env variables will contain the value for HOME and a few others, and those are what I'm interested in.

ms-toolsai-jupyter-insiders.vsix (1).zip

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster notebook-kernel Kernels issues (start/restart/switch, install ipykernel) labels Apr 2, 2024
@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 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, install ipykernel)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants