-
Notifications
You must be signed in to change notification settings - Fork 295
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
Changes to .env not picked up on Jupyter Kernel Restart #11746
Comments
Please could you enable logging as follows:
|
how are you changing this file, is it from within a vscode editor or via the terminal or outside vscode? |
I am changing the file from within a VS Code editor.
In the logs below, I start Jupyter Interactive, successfully get the value of FOO=BAR set in my I am setting this value in my workspace.code-workspace file:
The strange part is, if I add a new environment var, the Jupyter logs pick it up, but I can't access the new variable or variable changes. For example:
If I add a 3rd env var to my .env file, the above line changes from 42 to 43, but the custom env var count remains at 2.
Updated Verbose Jupyter Logs```Visual Studio Code (1.72.2, ssh-remote, desktop) Jupyter Extension Version: 2022.9.1202862440. Python Extension Version: 2022.16.1. Workspace folder /home/ubuntu/**** info 11:42:32.323: ZMQ install verified. User belongs to experiment group 'jupyterTest' User belongs to experiment group 'jupyterEnhancedDataViewer' info 11:42:33.096: LSP Notebooks experiment is enabled info 11:42:34.656: Got env vars ourselves faster /home/ubuntu/****/.venv/bin/python with env var count 42 in 67ms info 11:42:34.681: Process Execution: > ~/****/.venv/bin/python -m pip list > ~/****/.venv/bin/python -m pip list info 11:42:35.205: Got env vars with python /home/ubuntu/****/.venv/bin/python, with env var count 42 and custom env var count 2 in 615ms info 11:43:31.631: Starting interactive window for resource '' debug 11:43:31.631: Get Active Interpreter, Class name = I (started execution), Arg 1: undefined debug 11:43:31.631: Get Active Interpreter, Class name = I, completed in 0ms, has a truthy return value, Arg 1: undefined debug 11:43:31.779: No controller, hence notebook communications cannot be initialized for editor Interactive-1.interactive debug 11:43:31.779: Get Active Interpreter, Class name = I (started execution), Arg 1: "Interactive-1.interactive" debug 11:43:31.782: Get Active Interpreter, Class name = I, completed in 3ms, has a truthy return value, Arg 1: "Interactive-1.interactive" debug 11:43:31.783: TargetController found ID: .jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0./home/ubuntu/****/.venv/python./home/ubuntu/****/.venv/python.-m#ipykernel_launcher (Interactive) for document Interactive-1.interactive info 11:43:31.784: Preferred Remote kernel for Interactive-1.interactive is undefined debug 11:43:31.846: Intiailize notebook communications for editor Interactive-1.interactive debug 11:43:31.846: Resolving notebook UI Comms (resolve) for Interactive-1.interactive debug 11:43:31.846: initialize CommonMessageCoordinator debug 11:43:31.910: IPyWidgetMessageDispatcher.initialize debug 11:43:31.912: Controller selection change completed debug 11:43:31.912: Storing Preferred remote kernel for Interactive-1.interactive is undefined debug 11:43:34.640: start the kernel, options.disableUI=false debug 11:43:34.642: Start Jupyter Session in kernel.ts with disableUI = false info 11:43:34.642: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0./home/ubuntu/****/.venv/python./home/ubuntu/****/.venv/python.-m#ipykernel_launcher (Python Path: /home/ubuntu/****/.venv, EnvType: Venv, EnvName: '.venv', Version: 3.8.10) for 'Interactive-1.interactive' (disableUI=false) debug 11:43:34.643: Creating raw notebook for resource '' info 11:43:34.643: Computing working directory for resource '' debug 11:43:34.643: Kernel Launcher. launch, Class name = r (started execution), Arg 1: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/ubuntu/.vscode-server/extensions/ms-toolsai.jupyter-2022.9.1202862440/temp/jupyter/kernels/python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0/kernel.json","interpreterPath":"/home/ubuntu/****/.venv/bin/python","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3.8.10 ('.venv': venv)","metadata":{"interpreter":{"path":"/home/ubuntu/****/.venv/bin/python"}},"env":{}},"interpreter":{"id":"/home/ubuntu/****/.venv/bin/python","sysPrefix":"/home/ubuntu/****/.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv","path":"/home/ubuntu/****/.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv/bin/python","external":"file:///home/ubuntu/****/.venv/bin/python","path":"/home/ubuntu/****/.venv/bin/python","scheme":"file"}},"id":".jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0./home/ubuntu/****/.venv/python./home/ubuntu/****/.venv/python.-m#ipykernel_launcher"}, Arg 2: 60000, Arg 3: undefined, Arg 4: "~/****", Arg 5: {"_isCancelled":false,"_emitter":null} debug 11:43:34.643: Create activated Env, Class name = _ (started execution), Arg 1: {"interpreter":{"id":"/home/ubuntu/****/.venv/bin/python","sysPrefix":"/home/ubuntu/****/.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv","path":"/home/ubuntu/****/.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv/bin/python","external":"file:///home/ubuntu/****/.venv/bin/python","path":"/home/ubuntu/****/.venv/bin/python","scheme":"file"}}} debug 11:43:34.643: Getting activated env variables, Class name = V (started execution), Arg 1: undefined, Arg 2: , Arg 3: undefined debug 11:43:34.643: Getting activated env variables impl, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.643: Getting activated env variables ourselves, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.643: Getting activated env variables from Python, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.643: Get Custom Env Variables, Class name = w (started execution), Arg 1: undefined, Arg 2: "RunPythonCode" debug 11:43:34.644: Cached data exists getEnvironmentVariables, debug 11:43:34.644: Cached custom vars data exists getCustomEnvironmentVariables, debug 11:43:34.644: Get Custom Env Variables, Class name = w, completed in 1ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode" debug 11:43:34.646: Got activation Env Vars from cached promise with key /home/ubuntu/****_e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0 debug 11:43:34.646: Getting activated env variables ourselves, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: info 11:43:34.646: Got env vars with python /home/ubuntu/****/.venv/bin/python, with env var count 42 and custom env var count 2 in 3ms info 11:43:34.646: Got env vars ourselves faster /home/ubuntu/****/.venv/bin/python with env var count 42 in 3ms debug 11:43:34.646: Getting activated env variables from Python, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: debug 11:43:34.646: Got env vars ourselves /home/ubuntu/****/.venv/bin/python in 3ms debug 11:43:34.646: Getting activated env variables impl, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: debug 11:43:34.646: Got env vars with python /home/ubuntu/****/.venv/bin/python in 3ms debug 11:43:34.646: Getting activated env variables, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: , Arg 3: undefined debug 11:43:34.647: Create activated Env, Class name = _, completed in 4ms, has a truthy return value, Arg 1: {"interpreter":{"id":"/home/ubuntu/****/.venv/bin/python","sysPrefix":"/home/ubuntu/****/.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv","path":"/home/ubuntu/****/.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv/bin/python","external":"file:///home/ubuntu/****/.venv/bin/python","path":"/home/ubuntu/****/.venv/bin/python","scheme":"file"}}} info 11:43:34.657: Process Execution: > ~/****/.venv/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)" > ~/****/.venv/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)" debug 11:43:34.666: Launching kernel in kernelProcess.ts, Class name = x (started execution), Arg 1: "~/****", Arg 2: "" debug 11:43:34.666: Create activated Env, Class name = _ (started execution), Arg 1: {"interpreter":{"id":"/home/ubuntu/****/.venv/bin/python","sysPrefix":"/home/ubuntu/****/.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv","path":"/home/ubuntu/****/.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv/bin/python","external":"file:///home/ubuntu/****/.venv/bin/python","path":"/home/ubuntu/****/.venv/bin/python","scheme":"file"}}} debug 11:43:34.666: Getting activated env variables, Class name = V (started execution), Arg 1: undefined, Arg 2: , Arg 3: undefined debug 11:43:34.666: Getting activated env variables impl, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.666: Getting activated env variables ourselves, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.667: Getting activated env variables from Python, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.667: Get Custom Env Variables, Class name = w (started execution), Arg 1: undefined, Arg 2: "RunPythonCode" debug 11:43:34.667: Cached data exists getEnvironmentVariables, debug 11:43:34.667: Cached custom vars data exists getCustomEnvironmentVariables, debug 11:43:34.667: Cached custom vars data exists getCustomEnvironmentVariables, debug 11:43:34.667: Getting activated env variables, Class name = V (started execution), Arg 1: undefined, Arg 2: , Arg 3: false debug 11:43:34.667: Getting activated env variables impl, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.667: Getting activated env variables ourselves, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.667: Getting activated env variables from Python, Class name = V (started execution), Arg 1: undefined, Arg 2: debug 11:43:34.667: Get Custom Env Variables, Class name = w (started execution), Arg 1: undefined, Arg 2: "RunPythonCode" debug 11:43:34.667: Cached data exists getEnvironmentVariables, debug 11:43:34.667: Cached custom vars data exists getCustomEnvironmentVariables, debug 11:43:34.667: Get Custom Env Variables, Class name = w, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode" debug 11:43:34.667: Get Custom Env Variables, Class name = w, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode" debug 11:43:34.669: Got activation Env Vars from cached promise with key /home/ubuntu/****_e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0 debug 11:43:34.669: Got activation Env Vars from cached promise with key /home/ubuntu/****_e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0 debug 11:43:34.669: Getting activated env variables ourselves, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: info 11:43:34.670: Got env vars with python /home/ubuntu/****/.venv/bin/python, with env var count 42 and custom env var count 2 in 3ms debug 11:43:34.670: Getting activated env variables ourselves, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: info 11:43:34.670: Got env vars with python /home/ubuntu/****/.venv/bin/python, with env var count 42 and custom env var count 2 in 3ms info 11:43:34.670: Got env vars ourselves faster /home/ubuntu/****/.venv/bin/python with env var count 42 in 4ms debug 11:43:34.670: Getting activated env variables from Python, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: info 11:43:34.670: Got env vars ourselves faster /home/ubuntu/****/.venv/bin/python with env var count 42 in 3ms debug 11:43:34.670: Getting activated env variables from Python, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: debug 11:43:34.670: Got env vars ourselves /home/ubuntu/****/.venv/bin/python in 4ms debug 11:43:34.670: Getting activated env variables impl, Class name = V, completed in 4ms, has a truthy return value, Arg 1: undefined, Arg 2: debug 11:43:34.670: Got env vars with python /home/ubuntu/****/.venv/bin/python in 4ms debug 11:43:34.670: Got env vars ourselves /home/ubuntu/****/.venv/bin/python in 3ms debug 11:43:34.670: Getting activated env variables impl, Class name = V, completed in 3ms, has a truthy return value, Arg 1: undefined, Arg 2: debug 11:43:34.670: Got env vars with python /home/ubuntu/****/.venv/bin/python in 3ms debug 11:43:34.671: Getting activated env variables, Class name = V, completed in 5ms, has a truthy return value, Arg 1: undefined, Arg 2: , Arg 3: undefined debug 11:43:34.671: Getting activated env variables, Class name = V, completed in 4ms, has a truthy return value, Arg 1: undefined, Arg 2: , Arg 3: false debug 11:43:34.671: Create activated Env, Class name = _, completed in 5ms, has a truthy return value, Arg 1: {"interpreter":{"id":"/home/ubuntu/****/.venv/bin/python","sysPrefix":"/home/ubuntu/****/.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv","path":"/home/ubuntu/****/.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu/****/.venv/bin/python","external":"file:///home/ubuntu/****/.venv/bin/python","path":"/home/ubuntu/****/.venv/bin/python","scheme":"file"}}} info 11:43:34.679: Process Execution: > ~/****/.venv/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"82f88ec9-7c38-410a-89b8-9460cb6d4931" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/ubuntu/.local/share/jupyter/runtime/kernel-v2-39302NiTlK7Dy41xI.json > ~/****/.venv/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"82f88ec9-7c38-410a-89b8-9460cb6d4931" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/ubuntu/.local/share/jupyter/runtime/kernel-v2-39302NiTlK7Dy41xI.json info 11:43:34.679: Process Execution: cwd: ~/**** cwd: ~/**** debug 11:43:34.679: Launching kernel in kernelProcess.ts, Class name = x, completed in 13ms, has a truthy return value, Arg 1: "~/****", Arg 2: "" info 11:43:34.922: ipykernel version & path 6.16.1, ~/****/.venv/lib/python3.8/site-packages/ipykernel/__init__.py for /home/ubuntu/****/.venv/bin/python debug 11:43:35.548: KernelProcess error: /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2412: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5. warn( warn 11:43:35.549: StdErr from Kernel Process /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2412: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5. debug 11:43:35.549: KernelProcess error: /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '82f88ec9-7c38-410a-89b8-9460cb6d4931' instead of 'b"82f88ec9-7c38-410a-89b8-9460cb6d4931"'. warn 11:43:35.549: StdErr from Kernel Process /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '82f88ec9-7c38-410a-89b8-9460cb6d4931' instead of 'b"82f88ec9-7c38-410a-89b8-9460cb6d4931"'. debug 11:43:35.560: KernelProcess output: NOTE: When using the To exit, you will have to explicitly quit this process, by either sending To read more about this, see ipython/ipython#2049 To connect another client to this kernel, use: info 11:43:35.561: Kernel Output: To connect another client to this kernel, use: --existing kernel-v2-39302NiTlK7Dy41xI.json debug 11:43:35.711: Kernel Launcher. launch, Class name = r, completed in 1068ms, has a truthy return value, Arg 1: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/ubuntu/.vscode-server/extensions/ms-toolsai.jupyter-2022.9.1202862440/temp/jupyter/kernels/python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0/kernel.json","interpreterPath":"/home/ubuntu//.venv/bin/python","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3.8.10 ('.venv': venv)","metadata":{"interpreter":{"path":"/home/ubuntu//.venv/bin/python"}},"env":{}},"interpreter":{"id":"/home/ubuntu//.venv/bin/python","sysPrefix":"/home/ubuntu//.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu//.venv","path":"/home/ubuntu//.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu//.venv/bin/python","external":"file:///home/ubuntu//.venv/bin/python","path":"/home/ubuntu//.venv/bin/python","scheme":"file"}},"id":".jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0./home/ubuntu//.venv/python./home/ubuntu//.venv/python.-m#ipykernel_launcher"}, Arg 2: 60000, Arg 3: undefined, Arg 4: "~/", Arg 5:
warn 11:44:00.922: StdErr from Kernel Process /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2412: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5. debug 11:44:00.922: KernelProcess error: /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '32a79e9b-99dd-4652-a853-528fc2f27fb8' instead of 'b"32a79e9b-99dd-4652-a853-528fc2f27fb8"'. warn 11:44:00.922: StdErr from Kernel Process /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '32a79e9b-99dd-4652-a853-528fc2f27fb8' instead of 'b"32a79e9b-99dd-4652-a853-528fc2f27fb8"'. debug 11:44:00.928: KernelProcess output: NOTE: When using the To exit, you will have to explicitly quit this process, by either sending To read more about this, see ipython/ipython#2049 To connect another client to this kernel, use: info 11:44:00.929: Kernel Output: To connect another client to this kernel, use: --existing kernel-v2-39302RVXZyuaFWv45.json debug 11:44:01.119: Kernel Launcher. launch, Class name = r, completed in 637ms, has a truthy return value, Arg 1: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/ubuntu/.vscode-server/extensions/ms-toolsai.jupyter-2022.9.1202862440/temp/jupyter/kernels/python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0/kernel.json","interpreterPath":"/home/ubuntu//.venv/bin/python","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3.8.10 ('.venv': venv)","metadata":{"interpreter":{"path":"/home/ubuntu//.venv/bin/python"}},"env":{}},"interpreter":{"id":"/home/ubuntu//.venv/bin/python","sysPrefix":"/home/ubuntu//.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu//.venv","path":"/home/ubuntu//.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu//.venv/bin/python","external":"file:///home/ubuntu//.venv/bin/python","path":"/home/ubuntu//.venv/bin/python","scheme":"file"}},"id":".jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0./home/ubuntu//.venv/python./home/ubuntu//.venv/python.-m#ipykernel_launcher"}, Arg 2: 60000, Arg 3: undefined, Arg 4: "~/", Arg 5: debug 11:44:01.193: Widget Message: Received IPyWidgetMessages.IPyWidgets_onRestartKernel
warn 11:54:00.912: StdErr from Kernel Process /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2412: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5. debug 11:54:00.912: KernelProcess error: /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'e9943e83-a01d-4d35-bdde-d5491ed914ad' instead of 'b"e9943e83-a01d-4d35-bdde-d5491ed914ad"'. warn 11:54:00.912: StdErr from Kernel Process /home/ubuntu/****/.venv/lib/python3.8/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'e9943e83-a01d-4d35-bdde-d5491ed914ad' instead of 'b"e9943e83-a01d-4d35-bdde-d5491ed914ad"'. debug 11:54:00.919: KernelProcess output: NOTE: When using the To exit, you will have to explicitly quit this process, by either sending To read more about this, see ipython/ipython#2049 To connect another client to this kernel, use: info 11:54:00.919: Kernel Output: To connect another client to this kernel, use: --existing kernel-v2-39302ghwOyJHBO07j.json debug 11:54:01.105: Kernel Launcher. launch, Class name = r, completed in 637ms, has a truthy return value, Arg 1: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/ubuntu/.vscode-server/extensions/ms-toolsai.jupyter-2022.9.1202862440/temp/jupyter/kernels/python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0/kernel.json","interpreterPath":"/home/ubuntu//.venv/bin/python","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"python3810jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3.8.10 ('.venv': venv)","metadata":{"interpreter":{"path":"/home/ubuntu//.venv/bin/python"}},"env":{}},"interpreter":{"id":"/home/ubuntu//.venv/bin/python","sysPrefix":"/home/ubuntu//.venv","envType":"Venv","envName":".venv","envPath":{"$mid":1,"fsPath":"/home/ubuntu//.venv","path":"/home/ubuntu//.venv","scheme":"file"},"architecture":3,"sysVersion":"3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]","version":{"raw":"3.8.10","major":3,"minor":8,"patch":10,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.10 ('.venv': venv)","detailedDisplayName":"Python 3.8.10 ('.venv': venv)","uri":{"$mid":1,"fsPath":"/home/ubuntu//.venv/bin/python","external":"file:///home/ubuntu//.venv/bin/python","path":"/home/ubuntu//.venv/bin/python","scheme":"file"}},"id":".jvsc74a57bd0e2d664257320cf3c4f5517230187c1b95a639fdf5824ad557428355568770ab0./home/ubuntu//.venv/python./home/ubuntu//.venv/python.-m#ipykernel_launcher"}, Arg 2: 60000, Arg 3: undefined, Arg 4: "~/", Arg 5: debug 11:54:01.275: Executing silently Code (completed) = import sys\nprint(sys.executable) with 1 output(s)
|
@jtele2 Closing this issue for now, if however the issue still persists, please feel free to re-open this issue or create a new one and i'l.l take a look. |
Environment variables are only loaded once - not after kernel restarts on Juypter Interactive.
E.g., I'm having very similar issues to these closed issues:
This fix does not work for me:
Environment data
1.72.2 (user setup)
v2022.9.1202862440
v2022.16.1
Ubuntu 20.04.4 LTS
Python 3.8.10
venv
Local
v0.90.1
Expected behavior
"python.envFile": "${workspaceFolder}/developer/.env"
%env FOO
-->BAR
FOO=BAZ
and save%env FOO
-->BAZ
Actual behavior
New variable assignment not picked up:
%env FOO
-->BAR
.The only way I can get it to pick up the new definition is through
Developer: Reload Window
orPython: Clear Cache and Reload Window
I am using Remote - SSH. Could that have an impact?
Logs
Output for
Jupyter
in theOutput
panelThe text was updated successfully, but these errors were encountered: