text:
ModuleNotFoundError while trying to import project modules

Applies To

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

What happened?
Recently I started using GitHub codespace for the first time. I created a new codespace from one of my repositories. Assuming the folder structure as below:
my-codespace
|--- utils
|------ my_script.ipynb
|--- config.py

I get the following error when I import config.py inside my_script.ipynb:
ModuleNotFoundError: No module named 'config'
Autocomplete is working inside the editor, and it recognizes config.py while I try to import it

After a while red line appears indicating an error

All methods, classes, and variables belonging to config.py are available inside my_script.ipynb by autocomplete.
Currently, I'm using PyCharm on my computer and have no issues with that repository but I get the same error when I do the same thing on my local VS Code. Also, I had the same issue in python script instead of Jupyter notebook which was resolved by adding the following line to the settings.json file in my Windows machine:
"terminal.integrated.env.windows": {"PYTHONPATH": "${workspaceFolder}"}
and this to the Codespace version:
"terminal.integrated.env.linux": {"PYTHONPATH": "${workspaceFolder}"}
I would appreciate it if someone could help me in this regard.
VS Code Version
1.75.1
Jupyter Extension Version
2023.1.2010391206
Jupyter logs
Visual Studio Code (1.75.1, undefined, desktop)
Jupyter Extension Version: 2023.1.2010391206.
Python Extension Version: 2023.2.0.
Workspace folder y:\Programming\my-codespace
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 22:23:31.463: LSP Notebooks experiment is enabled
error 22:23:31.671: stat() failed for "C:%5CUsers%5CBabak%5CAppData%5CRoaming%5Cjupyter%5Ckernels" [Error (FileSystemError): Unable to resolve filesystem provider with relative file path 'C:\Users\Babak\AppData\Roaming\jupyter\kernels'
	at Yt.c (e:\VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:98:26311)
	at Object.stat (e:\VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:98:24412)
	at async al.exists (c:\Users\Babak\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\out\extension.node.js:17:18028)
	at async c:\Users\Babak\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\out\extension.node.js:17:88728] {
  code: 'Unknown'
}
info 22:23:32.464: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -m pip list
> ~\AppData\Local\Programs\Python\Python310\python.exe -m pip list
info 22:25:36.319: Find preferred kernel for Untitled-1.ipynb with metadata {"orig_nbformat":4,"language_info":{"name":"python"}} & preferred interpreter c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe
info 22:25:36.321: Preferred kernel .jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher is exact match or top match for non python kernels, (true, [object Object], false, false)
info 22:25:36.321: PreferredConnection: .jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher found for NotebookDocument: Untitled-1.ipynb
info 22:25:52.401: Find preferred kernel for y:\Programming\my-codespace\utils\my_script.ipynb with metadata {"orig_nbformat":4,"language_info":{"name":"python"}} & preferred interpreter c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe
info 22:25:52.403: Preferred kernel .jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher is exact match or top match for non python kernels, (true, [object Object], false, false)
info 22:25:52.404: PreferredConnection: .jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher found for NotebookDocument: y:\Programming\my-codespace\utils\my_script.ipynb
error 22:25:59.527: Live Notebook not available for y:\Programming\my-codespace\utils\my_script.ipynb
error 22:26:03.636: Live Notebook not available for y:\Programming\my-codespace\utils\my_script.ipynb
info 22:26:08.875: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher (Python Path: , EnvType: Unknown, EnvName: '', Version: 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]) for 'y:\Programming\my-codespace\utils\my_script.ipynb' (disableUI=false)
info 22:26:09.038: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> ~\AppData\Local\Programs\Python\Python310\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
info 22:26:09.098: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 27036
> ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 27036
info 22:26:09.099: Process Execution: cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers
cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers
info 22:26:09.291: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"f6eb4cb1-4f88-43b7-a8f5-042386291fae" --shell=9002 --transport="tcp" --iopub=9004 --f=c:\Users\Babak\AppData\Roaming\jupyter\runtime\kernel-v2-27036Wn303CD37a0U.json
> ~\AppData\Local\Programs\Python\Python310\python.exe -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"f6eb4cb1-4f88-43b7-a8f5-042386291fae" --shell=9002 --transport="tcp" --iopub=9004 --f=c:\Users\Babak\AppData\Roaming\jupyter\runtime\kernel-v2-27036Wn303CD37a0U.json
info 22:26:09.291: Process Execution: cwd: y:\Programming\my-codespace\utils
cwd: y:\Programming\my-codespace\utils
info 22:26:09.349: ipykernel version & path 6.2.0, ~\AppData\Local\Programs\Python\Python310\lib\site-packages\ipykernel\__init__.py for c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe
warn 22:26:11.433: StdErr from Kernel Process c:\Users\Babak\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode.
  warn(
c:\Users\Babak\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'f6eb4cb1-4f88-43b7-a8f5-042386291fae' instead of 'b"f6eb4cb1-4f88-43b7-a8f5-042386291fae"'.
  warn(

info 22:26:11.700: Started Kernel Python 3.10.10 (pid: 9344)
info 22:26:11.816: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\printJupyterDataDir.py
> ~\AppData\Local\Programs\Python\Python310\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\printJupyterDataDir.py
warn 22:26:11.943: Got a non-existent Jupyer Data Dir file:///c%3A/Users/Babak/AppData/Roaming/Python/share/jupyter
info 22:26:12.985: Cancel all remaining cells true || Error || undefined

Coding Language and Runtime Version
Python v3.10.10
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local

Please could you enable logging as follows:

Open settings & go into Jupyter->Logging
Change the value to verbose
Reload VS Code,
Attempt to repro the issue & then copy the output from the Jupyter output panel.

debug 23:20:14.223: VSCodeNotebookController::handleExecution, Class name = _v (started execution)
debug 23:20:14.224: Execute Cell 0 y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.224: start the kernel, options.disableUI=false for y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.225: Start Jupyter Session in kernel.ts with disableUI = false
info 23:20:14.225: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher (Python Path: , EnvType: Unknown, EnvName: '', Version: 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]) for 'y:\Programming\my-codespace\utils\my_script.ipynb' (disableUI=false)
debug 23:20:14.226: Creating raw notebook for resource 'y:\Programming\my-codespace\utils\my_script.ipynb'
debug 23:20:14.226: Computing working directory for resource 'y:\Programming\my-codespace\utils\my_script.ipynb'
debug 23:20:14.228: Kernel Launcher. launch, Class name = vp (started execution), Arg 1: {"id":".jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher","kernelSpec":{"interpreterPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"pythonjvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3","metadata":{"interpreter":{"path":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe"}},"env":{}},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"},"path":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe"},"kind":"startUsingPythonInterpreter"}, Arg 2: 60000, Arg 3: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 4: "y:\Programming\my-codespace\utils", Arg 5: {"a":false,"b":null}
debug 23:20:14.228: Create activated Env, Class name = tc (started execution), Arg 1: {"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}},"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"}}
debug 23:20:14.228: Getting activated env variables, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: undefined
debug 23:20:14.228: Getting activated env variables impl, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.228: Getting activated env variables from Python, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.228: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.276: Get Custom Env Variables, Class name = bc, completed in 48ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.287: Launching kernel in kernelProcess.ts, Class name = hp (started execution), Arg 1: "y:\Programming\my-codespace\utils", Arg 2: ""
debug 23:20:14.288: Create activated Env, Class name = tc (started execution), Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}
debug 23:20:14.288: Getting activated env variables, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: undefined
debug 23:20:14.288: Getting activated env variables impl, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.289: Getting activated env variables from Python, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.289: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.289: Cached data exists getEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.289: Cached custom vars data exists getCustomEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.289: Cached custom vars data exists getCustomEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.289: Getting activated env variables, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: false
debug 23:20:14.289: Getting activated env variables impl, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.289: Getting activated env variables from Python, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.289: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.289: Cached data exists getEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.289: Cached custom vars data exists getCustomEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.291: Get Custom Env Variables, Class name = bc, completed in 2ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.294: Get Custom Env Variables, Class name = bc, completed in 5ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.355: Got empty env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 127ms
debug 23:20:14.355: Getting activated env variables from Python, Class name = ps, completed in 127ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.355: Got env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 127ms with 0 variables
debug 23:20:14.356: Getting activated env variables impl, Class name = ps, completed in 128ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.356: Getting activated env variables, Class name = ps, completed in 128ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: undefined
debug 23:20:14.356: Create ProcessService, Class name = Ha (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:14.356: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:14.358: Got empty env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 69ms
debug 23:20:14.358: Getting activated env variables from Python, Class name = ps, completed in 70ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.358: Got env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 70ms with 0 variables
debug 23:20:14.359: Getting activated env variables impl, Class name = ps, completed in 71ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.359: Getting activated env variables, Class name = ps, completed in 71ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: undefined
debug 23:20:14.359: Create ProcessService, Class name = Ha (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:14.359: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:14.360: Got empty env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 71ms
debug 23:20:14.361: Getting activated env variables from Python, Class name = ps, completed in 72ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.361: Got env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 72ms with 0 variables
debug 23:20:14.361: Getting activated env variables impl, Class name = ps, completed in 72ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.362: Getting activated env variables, Class name = ps, completed in 73ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: false
debug 23:20:14.362: No custom variables nor do we have a conda environment
debug 23:20:14.367: Get Custom Env Variables, Class name = bc, completed in 11ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:14.368: Create ProcessService, Class name = Ha, completed in 12ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:14.368: Creating execution process, Class name = tc, completed in 12ms, has a truthy return value, Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}, Return Value: {}
debug 23:20:14.368: Create activated Env, Class name = tc, completed in 140ms, has a truthy return value, Arg 1: {"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}},"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"}}
info 23:20:14.371: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -c "import ipykernel; print(ipykernel.version); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.file)"

~\AppData\Local\Programs\Python\Python310\python.exe -c "import ipykernel; print(ipykernel.version); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.file)"
debug 23:20:14.373: Get Custom Env Variables, Class name = bc, completed in 14ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:14.374: Create ProcessService, Class name = Ha, completed in 15ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:14.374: Creating execution process, Class name = tc, completed in 15ms, has a truthy return value, Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}, Return Value: {}
debug 23:20:14.374: Create activated Env, Class name = tc, completed in 86ms, has a truthy return value, Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}
debug 23:20:14.375: Create activated Env, Class name = tc (started execution), Arg 1: {"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}},"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"}}
debug 23:20:14.375: Getting activated env variables, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: undefined
debug 23:20:14.375: Getting activated env variables impl, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.375: Getting activated env variables from Python, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.375: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.375: Cached data exists getEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.375: Cached custom vars data exists getCustomEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.377: Get Custom Env Variables, Class name = bc, completed in 2ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:14.437: Got empty env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 62ms
debug 23:20:14.437: Getting activated env variables from Python, Class name = ps, completed in 62ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.437: Got env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 62ms with 0 variables
debug 23:20:14.438: Getting activated env variables impl, Class name = ps, completed in 63ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:14.438: Getting activated env variables, Class name = ps, completed in 63ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: undefined
debug 23:20:14.438: Create ProcessService, Class name = Ha (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:14.438: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:14.438: Cached data exists getEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:14.440: Get Custom Env Variables, Class name = bc, completed in 2ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:14.440: Create ProcessService, Class name = Ha, completed in 2ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:14.440: Creating execution process, Class name = tc, completed in 2ms, has a truthy return value, Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}, Return Value: {}
debug 23:20:14.441: Create activated Env, Class name = tc, completed in 66ms, has a truthy return value, Arg 1: {"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}},"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"}}
info 23:20:14.447: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe ~.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 30512
~\AppData\Local\Programs\Python\Python310\python.exe ~.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 30512
info 23:20:14.447: Process Execution: cwd: ~.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers
cwd: ~.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\vscode_datascience_helpers
debug 23:20:14.679: Got a response of 1864 for INITIALIZE_INTERRUPT:0
info 23:20:14.683: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"3b25204a-c8a2-4861-82e5-b0673bc7bc6f" --shell=9002 --transport="tcp" --iopub=9004 --f=c:\Users\Babak\AppData\Roaming\jupyter\runtime\kernel-v2-305126UHZHyUqnf2Y.json
~\AppData\Local\Programs\Python\Python310\python.exe -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"3b25204a-c8a2-4861-82e5-b0673bc7bc6f" --shell=9002 --transport="tcp" --iopub=9004 --f=c:\Users\Babak\AppData\Roaming\jupyter\runtime\kernel-v2-305126UHZHyUqnf2Y.json
info 23:20:14.683: Process Execution: cwd: y:\Programming\my-codespace\utils
cwd: y:\Programming\my-codespace\utils
debug 23:20:14.684: Launching kernel in kernelProcess.ts, Class name = hp, completed in 397ms, has a truthy return value, Arg 1: "y:\Programming\my-codespace\utils", Arg 2: ""
info 23:20:14.754: ipykernel version & path 6.2.0, ~\AppData\Local\Programs\Python\Python310\lib\site-packages\ipykernel_init.py for c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe
debug 23:20:16.042: KernelProcess error: c:\Users\Babak\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode.
warn(
c:\Users\Babak\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '3b25204a-c8a2-4861-82e5-b0673bc7bc6f' instead of 'b"3b25204a-c8a2-4861-82e5-b0673bc7bc6f"'.
warn(

warn 23:20:16.043: StdErr from Kernel Process c:\Users\Babak\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode.
warn(
c:\Users\Babak\AppData\Local\Programs\Python\Python310\lib\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '3b25204a-c8a2-4861-82e5-b0673bc7bc6f' instead of 'b"3b25204a-c8a2-4861-82e5-b0673bc7bc6f"'.
warn(
debug 23:20:16.134: KernelProcess 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 c:\Users\Babak\AppData\Roaming\jupyter\runtime\kernel-v2-305126UHZHyUqnf2Y.json
debug 23:20:16.134: Kernel Output: To connect another client to this kernel, use: --existing c:\Users\Babak\AppData\Roaming\jupyter\runtime\kernel-v2-305126UHZHyUqnf2Y.json
debug 23:20:16.154: Kernel Launcher. launch, Class name = vp, completed in 1925ms, has a truthy return value, Arg 1: {"id":".jvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher","kernelSpec":{"interpreterPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","isRegisteredByVSC":"registeredByNewVersionOfExt","name":"pythonjvsc74a57bd083d208b031a4a5a0824f5f0b47c0388aa3b94cdd004c2f68e4341ab470ede466","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","executable":"python","display_name":"Python 3","metadata":{"interpreter":{"path":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe"}},"env":{}},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"},"path":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe"},"kind":"startUsingPythonInterpreter"}, Arg 2: 60000, Arg 3: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 4: "y:\Programming\my-codespace\utils", Arg 5:
debug 23:20:16.200: Waiting for Raw Session to be ready in postStartRawSession
debug 23:20:16.200: Waiting for Raw session to be ready, currently connected
debug 23:20:16.200: Raw session connected
debug 23:20:16.200: Waiting for Raw session to be ready for 30s
debug 23:20:16.201: Waited for Raw session to be ready & got connected
debug 23:20:16.201: Successfully waited for Raw Session to be ready in postStartRawSession
debug 23:20:16.201: Kernel status before requesting kernel info and after ready is unknown
debug 23:20:16.201: Sending request for kernelinfo
debug 23:20:16.375: Got response for requestKernelInfo
debug 23:20:16.375: Successfully compelted postStartRawSession
info 23:20:16.377: Started Kernel Python 3.10.10 (pid: 4728)
debug 23:20:16.380: Started running kernel initialization for y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:16.385: Executing silently Code (idle) = import os as _VSCODE_os\nimport sys as _VSCODE_sys\n%cd "y:\Programming\my-codespace\utils"\nif _VSCODE
debug 23:20:16.440: Executing silently Code (completed) = import os as _VSCODE_os\nimport sys as _VSCODE_sys\n%cd "y:\Programming\my-codespace\utils"\nif _VSCODE with 1 output(s)
debug 23:20:16.441: Not executing startup session: Object, code:
debug 23:20:16.441: Requesting Kernel info
debug 23:20:16.442: Got Kernel info
debug 23:20:16.442: End running kernel initialization, now waiting for idle
debug 23:20:16.443: Waiting for 60000ms idle on (kernel): 9126ff45-a34e-4ca0-a34d-60af606cb5e4 -> idle
debug 23:20:16.444: Finished waiting for idle on (kernel): 9126ff45-a34e-4ca0-a34d-60af606cb5e4 -> idle
debug 23:20:16.445: End running kernel initialization, session is idle
debug 23:20:16.448: IPyWidgetScriptSource.initialize
debug 23:20:16.449: IPyWidgetMessageDispatcher.initialize
debug 23:20:16.450: getDataDirsImpl, Class name = Lu (started execution), Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}
debug 23:20:16.451: Get Custom Env Variables, Class name = bc (started execution), Arg 1: undefined, Arg 2: "RunPythonCode"
debug 23:20:16.451: Cached data exists getEnvironmentVariables, y:\Programming\my-codespace
debug 23:20:16.452: Get Custom Env Variables, Class name = bc, completed in 1ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
debug 23:20:16.454: Get Jupyter Sub Paths, Class name = Lu, completed in 3ms, has a truthy return value, Arg 1: undefined, Return Value:
debug 23:20:16.454: Get Jupyter Paths, Class name = Lu, completed in 3ms, has a truthy return value, , Return Value:
debug 23:20:16.454: Create activated Env, Class name = tc (started execution), Arg 1: {"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}},"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"allowEnvironmentFetchExceptions":true}
debug 23:20:16.454: Getting activated env variables, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: true
debug 23:20:16.455: Getting activated env variables impl, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:16.455: Getting activated env variables from Python, Class name = ps (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:16.455: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:16.455: Cached data exists getEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:16.455: Cached custom vars data exists getCustomEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:16.458: Get Custom Env Variables, Class name = bc, completed in 3ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunPythonCode"
debug 23:20:16.463: Start Jupyter Session in kernel.ts with disableUI = false
debug 23:20:16.468: Start cell 0 execution @ 1677700216468
debug 23:20:16.471: Widget Message: Received IPyWidgets_kernelOptions in ScriptManager
debug 23:20:16.471: Widget Message: Received IPyWidgetMessages.IPyWidgets_kernelOptions
debug 23:20:16.528: IPyWidgetMessageDispatcher.initialize
debug 23:20:16.550: IPyWidgetMessageDispatcher.initialize
debug 23:20:16.661: Got empty env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 206ms
debug 23:20:16.662: Getting activated env variables from Python, Class name = ps, completed in 207ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:16.662: Got env vars with python c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe in 207ms with 0 variables
debug 23:20:16.663: Getting activated env variables impl, Class name = ps, completed in 209ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe
debug 23:20:16.663: Getting activated env variables, Class name = ps, completed in 209ms, has a falsy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: Uri:/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe, Arg 3: true
debug 23:20:16.663: Create ProcessService, Class name = Ha (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:16.663: Get Custom Env Variables, Class name = bc (started execution), Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:16.663: Cached data exists getEnvironmentVariables, y:\Programming\my-codespace\utils\my_script.ipynb
debug 23:20:16.664: Get Custom Env Variables, Class name = bc, completed in 1ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb", Arg 2: "RunNonPythonCode"
debug 23:20:16.664: Create ProcessService, Class name = Ha, completed in 1ms, has a truthy return value, Arg 1: "/y:/Programming/my-codespace/utils/my_script.ipynb"
debug 23:20:16.664: Creating execution process, Class name = tc, completed in 1ms, has a truthy return value, Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}, Return Value: {}
debug 23:20:16.664: Create activated Env, Class name = tc, completed in 210ms, has a truthy return value, Arg 1: {"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}},"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"allowEnvironmentFetchExceptions":true}
info 23:20:16.668: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe ~.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\printJupyterDataDir.py

~\AppData\Local\Programs\Python\Python310\python.exe ~.vscode\extensions\ms-toolsai.jupyter-2023.1.2010391206\pythonFiles\printJupyterDataDir.py
warn 23:20:16.772: Got a non-existent Jupyer Data Dir file:///c%3A/Users/Babak/AppData/Roaming/Python/share/jupyter
debug 23:20:16.773: getDataDirsImpl, Class name = Lu, completed in 323ms, has a truthy return value, Arg 1: {"resource":{"$mid":1,"fsPath":"y:\Programming\my-codespace\utils\my_script.ipynb","_sep":1,"external":"file:///y%3A/Programming/my-codespace/utils/my_script.ipynb","path":"/y:/Programming/my-codespace/utils/my_script.ipynb","scheme":"file"},"interpreter":{"id":"C:\USERS\BABAK\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE","sysPrefix":"C:\Users\Babak\AppData\Local\Programs\Python\Python310","displayPath":{"$mid":1,"path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\Users\Babak\AppData\Local\Programs\Python\Python310\python.exe","_sep":1,"external":"file:///c%3A/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","path":"/C:/Users/Babak/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":10,"raw":"3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"}}}
debug 23:20:16.810: Widget Message: data-base-url set to https://file%2B.vscode-resource.vscode-cdn.net/c%3A/Users/Babak/.vscode/extensions/ms-toolsai.jupyter-2023.1.2010391206/tmp/scripts/bf9810a3863f5c0d7a0d457df53ef29d76a7337a805a2244a28f867921bfef32/jupyter
debug 23:20:17.522: End cell 0 execution @ 1677700217522, started @ 1677700216468, elapsed time = 1.054s
info 23:20:17.522: Cancel all remaining cells true || Error || undefined
debug 23:20:17.522: Cancel pending cells
debug 23:20:17.523: Cell 0 executed with state Error
debug 23:20:17.523: VSCodeNotebookController::handleExecution, Class name = _v, completed in 3300ms, has a falsy return value

Please note that I did the above procedure on my local VS Code. Let me know if I should do the same thing or something else on the GitHub editor.

Please could you upload all of the logs, the logs you uploaded are missing a lot of information.
Please re-load vscode, and replicate the issue and then copy the logs

Sorry for the misunderstanding.
1.txt

You need to create a .env file with the following value
PYTHONPATH=<Fully qualified path to your directory>

Ideally you should be able to just add the following, however that does not work right now.
PYTHONPATH=./

That workaround didn't work for me

But it worked when I used my project path as PYTHONPATH!!!

I tried this on my local machine but since ${workspaceFolder} doesn't work in env file, I don't know how to apply this solution to github workspace.

@DonJayamanne do you have any idea?

@BabakAmini
You must set the path to the project path and not the post to python env
In python 'PYTHONPATH' is an additional path augmentation for modules,
Ie is not something invented by vscode

machine but since ${workspaceFolder} doesn't work in env file, I don't know how to apply this solution to github workspace.

What do you mean by GitHub workspace

@DonJayamanne
I've already set PYTHONPATH on my Windows machine but local VS Code didn't work with that approach.
This is a summary of what I did until now:
A- For VS Code on my local Windows machine:

I have to add the following lines to the \user\settings.json file to get Python files in subfolders working:

    "terminal.integrated.env.windows": {
        "PYTHONPATH": "${workspaceFolder}"
    }

I also have to add PYTHONPATH=Y:\Programming\my-codespace to the .env file inside the project's root folder to get Jupyter notebooks in subfolders working.

B- For the GitHub codespace version I tried to do the same things as above:

Adding Linux version (terminal.integrated.env.linux) to the settings.json file to make Python files in subfolders works without any issues.
Adding PYTHONPATH=${PYTHONPATH}:${workspaceFolder} to the .env file doesn't help to run Jupyter notebooks inside subfolders and I get an importing error yet.

I can confirm that PYTHONPATH has the right values by running print(os.environ).

You need to create a .env file with the following value

@DonJayamanne why is an .env file suddenly necessary when everything worked perfectly fine without it by now?

@BabakAmini
I'm confused, please can we focus on one environment at a time.
You seem to be trying codespaces as well we local windows.
Lets focus on windows for now
Is A- For VS Code on my local Windows machine: this approach working for you?

I had to do those two steps in section "A" I mentioned before

Yes, that is the solution and that is expected.
The changes to user/settings.json is only required when running code in the terminal.
Now that we know local window works, lets move onto Code spaces,
Please can you let me know whether this work or not.

Closing this issue as its been over 4 weeks, since the information was requested.
We'll be happy to reopen the issue when the requested information has been provided.

Python files work as expected but Jupyter Notebooks fail.

However thats in the terminal, and that doesn't apply, thats the same as running this outside vscode with the env variables configured for a terminal

authors: BabakAmini DonJayamanne youurayy


text:
Unable to connect to a named server, but can automatically initiate a default server on Jupyterhub.

Environment data

VS Code version: Version: 1.86.1 (Universal)
Commit: 31c37ee8f63491495ac49e43b8544550fbae4533
Date: 2024-02-07T09:09:01.236Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 22.6.0
Jupyter Extension version (available under the Extensions sidebar): v2024.1.1
Python Extension version (available under the Extensions sidebar): N/A
OS (Windows | Mac | Linux distro) and version: mac
Python and/or Anaconda version: N/A
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Jupyter server running: Remote

Expected behaviour and Actual behaviour
I use Jupyterhub on an HPC system. Typically, I create a new server (on the computing nodes) and obtain the URL and token in Jupyterhub. For instance, in this example URL: https://jupyterhub.hpc.ucar.edu/stable/user/che43/jupyter-heavy3/?token=xxxxxxxxxxxxxxxxxxxxxxxx, "che43" represents my username and "jupyter-heavy3" is the server name. I can access the remote server using JetBrains Dataspell. However, when using VS code, the IDE always starts a default server on Jupyterhub with limited resources (only 4GB memory).
Problem in VS code

Works in Dataspell

Logs
Jupyter Extension Version: 2024.1.1.
Python Extension not installed.
Pylance Extension not installed.
Platform: linux (x64).
Workspace folder ~/work/projects/SST-bias, Home = /glade/u/home/che43
20:33:07.458 [info] Start refreshing Kernel Picker (1707708787458)
20:33:07.470 [info] Not using Pylance
20:33:07.961 [info] Starting Kernel connectToLiveRemoteKernel, 2a7c5de6-305c-4b3a-a993-6de5691e5dc7  for '~/work/projects/SST-bias/test_vs_code.ipynb' (disableUI=true)
20:33:25.609 [error] Error fetching kernels from https://jupyterhub.hpc.ucar.edu/stable/user/<username>/ (JupyterHub-heavy3): [r [Error]: JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17959] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/hub/user/<username>/api/kernels?1707708805501',
      status: 424,
      statusText: 'Failed Dependency',
      headers: [p [Headers]],
      counter: 1
    }
  },
  traceback: ''
}
20:33:25.613 [error] Error fetching kernels from https://jupyterhub.hpc.ucar.edu/stable/user/<username>/ (JupyterHub-heavy3): [r [Error]: JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/hub/user/<username>/api/kernels?1707708805503',
      status: 424,
      statusText: 'Failed Dependency',
      headers: [p [Headers]],
      counter: 1
    }
  },
  traceback: ''
}
20:33:25.622 [error] Failed to fetch running kernels from remote server, connection may be outdated or remote server may be unreachable [r [Error]: JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async ou.validateRemoteServer (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:252:2987)
	at async ou.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:252:1904)
	at async a_.createJupyterSession (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:252:35995)] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/hub/user/<username>/api/kernels?1707708805505',
      status: 424,
      statusText: 'Failed Dependency',
      headers: [p [Headers]],
      counter: 1
    }
  },
  traceback: ''
}
20:33:25.626 [warn] Error occurred while trying to start the kernel, options.disableUI=true Error: Failed to connect to the remote Jupyter Server 'https://jupyterhub.hpc.ucar.edu/'. Verify the server is running and reachable. (Failed to connect to the remote Jupyter Server 'https://jupyterhub.hpc.ucar.edu/'. Verify the server is running and reachable. (JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>).).
    > at ou.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:252:2791)
    > url = https://jupyterhub.hpc.ucar.edu/stable/user/<username>/
    > serverProviderHandle = [object Object]
    > originalError = Error: Failed to connect to the remote Jupyter Server 'https://jupyterhub.hpc.ucar.edu/'. Verify the server is running and reachable. (JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>).
    > baseUrl = https://jupyterhub.hpc.ucar.edu/
20:33:25.646 [warn] Could not fetch kernels from the remote server, falling back to cache: Error: JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>
20:33:25.646 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at v.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:10935)
	at ni.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:29299)
	at r.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4518)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:20060)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17959]
20:33:25.667 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at v.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:10935)
	at ni.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:29299)
	at r.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4518)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:20060)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485]
20:33:25.677 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at v.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:10935)
	at ni.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:29299)
	at r.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4518)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)]
20:33:25.743 [error] Error fetching kernels from https://jupyterhub.hpc.ucar.edu/stable/user/<username>/ (JupyterHub-heavy3): [r [Error]: JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/hub/user/<username>/api/kernels?1707708805668',
      status: 424,
      statusText: 'Failed Dependency',
      headers: [p [Headers]],
      counter: 1
    }
  },
  traceback: ''
}
20:33:25.744 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at v.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:10935)
	at ni.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:29299)
	at r.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4518)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:20060)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485]
20:33:25.744 [error] UniversalRemoteKernelFinder: Failed to get kernels without cache [r [Error]: JupyterHub server no longer running at /user/<username>/api/kernels. Restart the server at https://jupyterhub.hpc.ucar.edu/stable/hub/spawn/<username>
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/hub/user/<username>/api/kernels?1707708805668',
      status: 424,
      statusText: 'Failed Dependency',
      headers: [p [Headers]],
      counter: 1
    }
  },
  traceback: ''
}
20:33:25.746 [warn] Disposing old controller connectToLiveRemoteKernel:'2a7c5de6-305c-4b3a-a993-6de5691e5dc7' for view = 'jupyter-notebook'
20:33:25.747 [warn] Disposing old controller connectToLiveRemoteKernel:'2a7c5de6-305c-4b3a-a993-6de5691e5dc7 (Interactive)' for view = 'interactive'
20:33:25.747 [info] End refreshing Kernel Picker (1707708787458)
20:35:55.017 [error] Error fetching kernels from https://jupyterhub.hpc.ucar.edu/stable/user/<username>/ (JupyterHeavy1): [r [Error]: Forbidden
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/user/<username>/api/kernels?1707708954963',
      status: 403,
      statusText: 'Forbidden',
      headers: [p [Headers]],
      counter: 0
    }
  },
  traceback: ''
}
20:35:55.037 [error] UniversalRemoteKernelFinder: Failed to get kernels without cache [r [Error]: Forbidden
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/user/<username>/api/kernels?1707708954963',
      status: 403,
      statusText: 'Forbidden',
      headers: [p [Headers]],
      counter: 0
    }
  },
  traceback: ''
}
20:35:55.038 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at v.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:10935)
	at ni.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:29299)
	at r.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4518)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:20060)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485]
20:35:55.039 [info] End refreshing Kernel Picker (1707708787458)
20:36:14.259 [error] Error fetching kernels from https://jupyterhub.hpc.ucar.edu/stable/user/<username>/ (JupyterHub-32G): [r [Error]: Forbidden
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/user/<username>/api/kernels?1707708974199',
      status: 403,
      statusText: 'Forbidden',
      headers: [p [Headers]],
      counter: 0
    }
  },
  traceback: ''
}
20:36:14.277 [error] UniversalRemoteKernelFinder: Failed to get kernels without cache [r [Error]: Forbidden
	at r.create (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1006)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Object.Rl [as listRunning] (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
	at async r.getRunningKernels (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4914)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:19197)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485] {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://jupyterhub.hpc.ucar.edu/stable/user/<username>/api/kernels?1707708974199',
      status: 403,
      statusText: 'Forbidden',
      headers: [p [Headers]],
      counter: 0
    }
  },
  traceback: ''
}
20:36:14.277 [error] Jupyter Lab Helper:getKernelSpecs failure:  [Error: Poll (@jupyterlab/services:KernelSpecManager#specs) is disposed.
	at v.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:10935)
	at ni.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/node_modules/@jupyterlab/services.js:11:29299)
	at r.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:139:4518)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Promise.all (index 0)
	at async VD.listKernelsFromConnection (~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:20060)
	at async ~/.vscode-server/extensions/ms-toolsai.jupyter-2024.1.1-linux-x64/dist/extension.node.js:249:17485]
20:36:14.279 [info] End refreshing Kernel Picker (1707708787458)

Duplicate of https://github.com/microsoft/vscode-jupyter-hub/issues/39

source: gharchive/issue

authors: DonJayamanne Yefee

repo: microsoft/vscode-jupyter

license: MIT

license_type: permissive

license_source: github-api


text:
Running all cells display the timer against all cells

As reported by Jim
Requirement:

When you run all, only the cell that is currently running should have a timer against it
All cells that are not running but queued should just have spinner & no timer.

Validated.

authors: DonJayamanne rchiodo


text:
"Organization access" not showing up

Extension version: V0.20.0
VSCode Version: 1.49.1
OS: Linux Mint 20

Steps to Reproduce:

Add extension and authenticate with github following this guide:  https://code.visualstudio.com/docs/editor/github
Verified that I can clone my personal repositories in vscode.
Of course I can't yet see my organisation repos.
From my github account, go to settings / applications / Authorized OAuth Apps
Click on "Github For VSCode"
I see the correct permissions, but "Organisation access" does not show up, so I can't request access.
Sanity check:  When I go to another oath app, for example Smartgit, I do see the "Organization Access" section and can request authorisation without problem.

I have the same issue. Also when trying to clone a repository using Remote-Containers, I cannot authorise my organisation anymore. Is this a problem with the registered GitHub app?

The GitHub OAuth app we're using was created by GitHub when this project started, and is a first party app. I believe first party apps are granted organizational access by default.
GitHub plans to eventually deprecate the auth server that we're using that uses this app, and then we will likely transition to our own oauth app. Until then, I think this is expected behavior

I've the same issue. I can't access my repositories which have been created in organization with from my private github profile. The 3rd party apps policy in organization settings has been set to "no resitrctions" but repos are still not visible in VSC.

same issue here

Why is this issue closed?

no workaround for organisations access to repo ?

+1

The GitHub OAuth app we're using was created by GitHub when this project started, and is a first party app. I believe first party apps are granted organizational access by default.

This belief is probably mistaken given that Github is not granting organizational access to the extension.

Until then, I think this is expected behavior

To clarify, you believe the Github extension not having access to organization repos that our accounts have access to is expected behavior?

Why is this issue closed?!

Any news?

I also would need a solution for this.

Running into the exact same issue.  There isn't an option to see your organizational repositories with the extension.  You can only interact and see them if you've already either manually cloned the repository via command line, or another UI tool.  Seems shortsighted to close this issue when the support doesn't actually exist.

Just tried - when I authorize Organizations do not show in the "from GitHub" list.  But when I clone an organization repo via a URL I'm able to push changes to it.

Why is this closed ?I have the same issue

This is also an issue for me. This should not be closed.

same here...

I have the same problem. Im part of an Organization and I cant see the PR's or Issues they open from VSCode. Can someone reopen this, please.

Same here

This should not be a closed issue. I am still running into this issue.

I too have this issue. Is this expected behavior or not?

We have the same issue.

I think,for the solution now just input the link(of repository from your organization) in code space.
I tryed and its works.

I thought the repo you have in another organization Will not show up(except your repo in your account) until you put the link on it
That Will give access but before make sure do You have to access that repo as owner or maintener

This can still happen today. I as able to resolve it by signing out of accounts in vscode. Then signing back in using the gitlense sign in option.

authors: AllanOricil RMacfarlane Salzian Sherbb TUNBudi06 TheByrd92 artem-v-shamsutdinov etola florianajir ghubjason greemo jacob-monarch jaunt jmorris-dev lucasraziel makerovski mniemczyk pbley-sbi prodkt pshroti vadrif-draco veikkoruuskanen yaronhay

repo: microsoft/vscode-pull-request-github


text:
When autosave is disabled, one cannot create an issue using only the keyboard

Reported by @jooyoungseo

Using only the keyboard, create a github issue in VS Code with autosave disabled
🐛 ctrl+save does not work

JooYoung had asked if we could instead use ctrl+enter here to align with the issue reporter and the PR creation keybindings.

I have the following keybindings for Windows and Linux, and it works nicely and much better than the default (ctrl+s) shortcut key.
[
  {
    "key": "ctrl+enter",
    "when": "!isMac && !issues.creatingFromFile && resourceScheme == 'newIssue'",
    "command": "runCommands",
    "args": {
      "commands": ["workbench.action.files.save", "issue.createIssueFromFile"]
    }
  },
  {
    "key": "ctrl+s",
    "command": "-issue.createIssueFromFile",
    "when": "!isMac && !issues.creatingFromFile && resourceScheme == 'newIssue' && config.files.autoSave != 'off'"
  }
]

I'm adding the ctrl/cmd+enter keybinding.

authors: alexr00 jooyoungseo meganrogge


text:
DS: Start page for python extension (MVP)

Based on spec here:
https://microsoft.sharepoint.com/:w:/t/python/EZVIy6ddOv1PqWmaLbHHXVYBzNQ1qE_Jd9Pk9-90hbTC_w?e=vhS1CS

Looks good to me. Validated.

repo: microsoft/vscode-python


text:
Nightly flake test is failing for all environments

Looking at the latest, it looks like it might be running out of memory again. Or something is crashing so hard it's causing mocha to die.
https://dev.azure.com/ms/vscode-python/_build/results?buildId=75324&view=logs&j=cc2eb796-49ab-5f68-8686-49c6b46dca57&t=c8d1d5b6-ff76-5f2e-080d-0ce9a9092275

Validated.

authors: IanMatthewHuff rchiodo


text:
Can't open notebook editor on remote-ssh

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur
On remote-ssh

Open any .ipynb file on remote-ssh.
execute "Create new blank jupyter notebook"
execute "Switch to insiders daily channel".

Actual behavior

"Cannot open resource with notebook editor type 'jupyter-notebook', please check if you have the right extension installed or enabled."
"Command 'Python: Create New Blank Jupyter Notebook' resulted in an error (command 'python.datascience.createnewnotebook' not found)"
"Command 'Python: Switch to Insiders Daily Channel' resulted in an error (command 'python.switchToDailyChannel' not found)"

Expected behavior
Open the notebook with new ui like what I can do on the local.

Your Jupyter and/or Python environment
Please provide as much info as you readily know

Jupyter server running: Remote
Extension version: 2020.10.113101-dev
VS Code version: 1.49.3
Setting python.jediEnabled: ?
Setting python.languageServer: pylance
Python and/or Anaconda version: 3.7
OS: Linux (Ubuntu 20):
Virtual environment: conda

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

Thanks for reporting this issue however Native Notebooks is only supported in insiders version of VS Code

@DonJayamanne
I am using vscode insider, is that mean there is no insider version for remote ssh ?

I am using vscode insider

When i saw VS Code version: 1.49.3, I assumed u werent on insiders.
Please could you update to the latest Insider version.
Let me know how that goes
Also you seem to be getting some errors that are unrelated to native notebooks.
I'm referring to command .... not found.

@DonJayamanne
I did the following things ...

update to 1.51.0-insider
update python on remote-ssh to 2020.10.298473528-dev
open any .ipynb
still the same "Cannot open resource with notebook editor type 'jupyter-notebook', please check if you have the right extension installed or enabled."
execute "select interpreter", and it only show python environment on local.
while I am hesitating, it choose the previously used remote python environment for me. and load ipynb in new ui.
Restart vscode and open notebook again, this time it load it correctly and automatically w/o any problem.

Maybe the problem is I need to manually start the python extension after the update of vscode or python extension ? I don't know. But I am happy now.

authors: DonJayamanne richarddwang


text:
Error: unsupported status (Running)

Issue Type: Bug
Running pytest results in the following test summary:
=========================== short test summary info ===========================
ERROR tests/test_basics.py
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
======================= 101 warnings, 1 error in 3.57s ========================
Error: Error: unsupported status (Running)

The test code is the following:

import tensorflow as tf
from sgd_g2 import SGD_G2

def test_linear_optimization():
    var1 = tf.Variable(3.0)
    loss = lambda: var1
    optimizer = SGD_G2()
    for _ in range(10):
        optimizer.minimize(loss, [var1])
    print(var1.numpy())

where sgd_g2 is a custom Optimizer. I imagine this might have something to do with tensorflow doing parallel computing and vscode not liking that or something like that. Anyway running pytest in the terminal results in
============================================================================================== 1 passed, 101 warnings in 5.49s ===============================================================================================

Extension version: 2021.5.926500501
VS Code version: Code 1.57.0 (b4c1bd0a9b03c749ea011b06c6d2676c8091a70c, 2021-06-09T17:18:42.354Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.91GB (4.63GB free)

Process Argv
--crash-reporter-id 74736abc-a148-4775-8281-3e328798370c

Screen Reader
no

VM
0%

Dupe of #15736

authors: FelixBenning karthiknadig


text:
Python scripts are executed with the wrong path separator in integrated Powershell on Windows

Discussed in https://github.com/microsoft/vscode-python/discussions/15870

Originally posted by tsbertalan September  5, 2020

Environment data

VS Code version: 1.48.2
Extension version (available under the Extensions sidebar): 2020.08.106424
OS and version: Windows 10 , 1909, build 18363.1016
Python version (& distribution if applicable, e.g. Anaconda): Anaconda, 3.7.7
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: N/A
Relevant/affected Python-related VS Code extensions and their versions: N/A
Value of the python.languageServer setting: Jedi

Expected behaviour
On Windows, with Powershell as the embedded terminal, the path to the python executable and to the current script being executed should use backslashes.
Actual behaviour
A script command line like this is generated:
(py37) PS C:\Users\tsbertalan\SNIPPED> & C:/Users/tsbertalan/Anaconda3/envs/py37/python.exe "c:/Users/tsbertalan/SNIPPED/SCRIPT.py"

However, invoking workbench.action.debug.start instead generates:
(base) PS C:\Users\tsbertalan\SNIPPED>  & 'C:\Users\tsbertalan\Anaconda3\envs\py37\python.exe' 'c:\Users\tsbertalan\.vscode\extensions\ms-python.python-2020.8.106424\pythonFiles\lib\python\debugpy\launcher' '53300' '--' 'c:\Users\tsbertalan\SNIPPED\SCRIPT.py'

Which was very confusing at first--when I debugged the script, paths which were constructed using os.path.join with os.path.basename(__file__) had homogeneous, all-backslash paths, but when I ran it with python.execInTerminal, the paths were mixed!
Steps to reproduce:

Use "Python: Select Interpreter" to launch a file dialog and locate python.exe in C:\Users\USERNAME\Anaconda3\envs\ENVNAME.
Use python.execInTerminal (the little play button) to launch a script, with terminal.integrated.shell.windows unset (that is, left to its default of C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe).
Witness the forward-slash generated command in the  integrated terminal.

I'm currently working on a script that uses os.path.join, os.path.basename, etc., and in particular uses basename(__file__) to get the path of the current script in a cross-platform way. This does intelligently interprets the forward slashes as path separators, and trims off the SCRIPT.py part, leaving a C:/Users... path. But then, subsequent joins with this path have mixed slashes, since join correctly uses backslash as a path separator on windows.
This isn't a problem for my script at the moment, since all file-access code (for instance, these mixed-slash paths are being passed to glob.glob) seems to be intelligently homogenizing the slashes. But it could become a problem in the future.

Thank you for submitting your feature request and everyone who considered it! Unfortunately this issue did not receive enough votes over the allotted time, and so we are closing the issue.


text:
Create: New Python File missing from VS code shortcut and no sign of it in hotkeys

Behaviour
Normally when I used Ctrl+alt+windows+N to create a new file it gives me the option to create a txt file,.py or jupyter lab file. After a recent update it seems the .py is missing now while jupyter lab option still remains.
XXX
Steps to reproduce:

Load VS code version 1.71.2
Click File drop down and then New File
Notice that the pallet bar no longer shows .py as an option in dropdown.

We removed that option as we now use VSCode specific create python file command itself which is not supported in the New File UI. I'll talk with the team to reconsider adding it back.

Making the call to bring this back for now until we get some feedback from internal team.

authors: Lord-O-Binary karrtikr


text:
Improve python test discovery error reporting

Currently when there's something wrong during test discovery, I need to go to Output -> Python and find the exact issue among tons of other messages.
Is it possible to click error in test explorer and show corresponding error messages?
Also in this case, other tests without issue are not shown in test explorer. This makes me think all tests in this repo cannot be discovered. Could it be made clearer like which tests are with issues and which are not.

Hello, we are aware of buggy behavior on test discovery and are working on a rewrite of how testing works in vscode. During this effort we plan on reviewing the scenarios for errors and that should fix this issue as well. The main issue which will be working on is here: #17242, and progress will be updated on this issue. Thank you!

There is now a clickable link that will take you to the output. It would be good to have it bring you to the exact line in the logs that includes the error. This more specific request will be tracked: https://github.com/microsoft/vscode-python/issues/4205. Thanks!


text:
Hatch: Select interpreter list does not show hatch environments from 3.12

(per instructions in: https://github.com/microsoft/vscode-python/discussions/23706#discussioncomment-9885918)
In our team some have this problem and for some it just works.
Background:

system uses Python 3.10 (Ubuntu 22.04)
pyenv is installed and provides 3.12.2

u30576@DCL0004:~$pyenv versions
* system (set by /home/u30576/.pyenv/version)
  3.12.2

We have different Python projects (we use hatch) and we are moving them over to 3.12.x.
We therefore have to select interpreter choose workspace and then pick among the following:

The hatch project has two environments in addition to the default: lint (black, flake8) and test (pytest etc). These are shown for 3.10.12 but not for 3.12. Why?

Would you be able to take a look at this issue? @ofek @flying-sheep

@jimisola the discovery works like this:

hatch env show --json is run. The keys of the resulting JSON object are each a $name of a candidate env (display e.g. with hatch env show --json | jaq -r 'keys()[]')
hatch env find $name is run for each of them to find the path
the candidates are filtered using pathExists (envs that don’t exist are discarded)

So I assume you just didn’t cause hatch to create the environments that don’t appear.
There is one way I can think of that we could of course make VS Code work more intuitively, i.e. instead of filtering out the nonexistent names, we leave them in, and once user selects one, we hatch env create $name it.
But my VS Code codebase skills aren’t good enough for that, I don’t know if postponing the selection here and showing a little progress notification while trying to create the env is possible.

(for anyone reading it should be `jq -r 'keys[]'
@flying-sheep Ok. That explains it. I'm in and out of so many python projects that it's difficult to remember for which a particular environment have been created or not.
Personally, I rather have VS Code show all the environments that are available (perhaps indication if one needs to be created) and the, like you suggested, it's created on the fly.

No, it doesn’t, please reopen.

But my VS Code codebase skills aren’t good enough for that, I don’t know if postponing the selection here and showing a little progress notification while trying to create the env is possible.

This is possible. I will have some examples on this soon. Working on cleaning up the APIs that can make this work.

This is symptomatic for the VS Code issue tracker. Issues get closed claiming that more input is needed while in fact necessary information has been provided and the ball is not in the reports hands anymore.
Please reopen.

authors: flying-sheep jimisola karthiknadig lfvjimisola


text:
Debug Adapter - Ensure ptvsd_launcher.py supports old and new versions of PTVSD

Based on some flag, the launcher script will either use the old stable version of PTVSD or the new version of PTVSD
Based on some flag the launcher script will either use wheels or not (use of wheels is to be driven via an experiment)

@kimadeline, what needs to be validated for this?

Nothing to validate here.


text:
vscode reports "no debug adapter found" when click "start without debugging"

VS Code version: Latest
Extension version (available under the Extensions sidebar): Latest
OS and version: win10
Python version (& distribution if applicable, e.g. Anaconda): Anaconda python3.7
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: none
Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): MPLS

Expected behaviour
No error
Actual behaviour
vscode reports: no debug adapter found
Steps to reproduce:

Create a python file

print("hello")

Click "Start without debugging".
Then vscode reports "no debug adapter found"

Logs
[2019-10-11 20:21:21.113] [renderer1] [error] no debug adapter found: Error: no debug adapter found
    at t.RawDebugSession.handleErrorResponse (file:///C:/Users/zjli1/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2751:326)
    at Promise.then.e (file:///C:/Users/zjli1/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2750:738)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Related issue: https://github.com/microsoft/vscode/issues/82354

The issue is caused by vscode.
https://github.com/microsoft/vscode/issues/82354