-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python extension is failing to load #23956
Comments
Open VS Code "Settings", search for "Python Locator", switch from "native" to "js", this works for me. |
I have the exact same issue (on Archlinux). In the settings, "Python Locator" is already set to "js" for me as the default. |
It helps! Thanks! After experiencing many searches and restarts, this resolved my issue. Here is the error, Hope this helps you. :
|
Does
work for you? @gurmitteotia |
@anthonykim1 No, changing of "Python Locator" to "js" does not solve the issue for me. However downgrade of following 2 extension solve the issue for now. Looks like a bug in newer version. pylance = v2024.7.1 |
@gurmitteotia : Thanks. Downgrading fixes the issue for me too. |
@karthiknadig I think the error "Failed to resolve env...etc" is coming from
|
Switching from "native" to "js" in Python Locator solved the problem for me. However, in the Python Locator Output I still see the following: 2024-09-14 12:48:53.174 [info] Starting Python Locator c:\Users<USER>.vscode\extensions\ms-python.python-2024.14.1-win32-x64\python-env-tools\bin\pet.exe server 2024-09-14 12:48:53.174 [error] thread '' panicked at crates\pet\src\find.rs:76:17: 2024-09-14 12:48:53.286 [warning] Failed to open HKLM\Software\Python, Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." } Windows 10 |
Apologies for late response. I'm glad:
worked out for you. are you still seeing these panicked logs in your machine? |
I don't see this issue in the latest version |
I had Python and Pylance updated in my VSCode and I was still having this issue. |
This was an issue for me when using |
Type: Bug
Everything was working until yesterday then after some auto updates on my Linux system, python extension is no more loading in VS Code. I tried by creating new conda environment but still facing same issue. I can use/switch conda environment without any issue.
While starting VS Code python extension is generating following error on "python" output windows-
2024-08-16 12:49:39.878 [info] Experiment 'pythonaa' is active
2024-08-16 12:49:39.878 [info] Experiment 'pythonCreateEnvOnPipInstall' is active
2024-08-16 12:49:39.878 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-08-16 12:49:39.878 [info] Experiment 'pythonSurveyNotificationcf' is active
2024-08-16 12:49:39.878 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-08-16 12:49:39.878 [info] Experiment 'pythonTestAdapter' is active
2024-08-16 12:49:39.878 [info] Native locator: Refresh started
2024-08-16 12:49:39.878 [info] Default formatter is set to null for workspace /home/test_user/source/test_prod/test_project
2024-08-16 12:49:39.890 [info] > pyenv which python
2024-08-16 12:49:39.890 [info] cwd: .
2024-08-16 12:49:39.984 [info] Conda environment manager found at: /home/test_user/anaconda3/bin/conda
2024-08-16 12:49:40.016 [info] Native locator: Refresh finished in 591 ms
2024-08-16 12:49:40.025 [error] Python Extension: interpreterManager.refresh [s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
2024-08-16 12:49:40.150 [error] [
'Failed to check whether to display prompt for conda inherit env setting, Class name = v, completed in 1ms, has a falsy return value, Arg 1: Uri:/home/test_user/source/test_prod/test_project, Return Value: undefined',
[s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
]
2024-08-16 12:49:40.150 [error] [
'Failed to intialize conda inherit env prompt, Class name = v, completed in 3ms, has a falsy return value, Arg 1: Uri:/home/test_user/source/test_prod/test_project, Return Value: undefined',
[s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
]
2024-08-16 12:49:40.150 [error] [
'getActivatedEnvironmentVariables, Class name = D, completed in 2ms, has a falsy return value, Arg 1: Uri:/home/test_user/source/test_prod/test_project, Arg 2: undefined, Arg 3: undefined, Arg 4: "/usr/bin/bash"',
[s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
]
2024-08-16 12:49:40.150 [error] Failed to apply terminal env vars undefined [s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
2024-08-16 12:49:40.151 [error] [
'Failed to activate a workspace, Class name = m, completed in 401ms, has a falsy return value, Arg 1: Uri:/home/test_user/source/test_prod/test_project/env, Arg 2: {"started":1723808979277}, Return Value: undefined',
[s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
]
2024-08-16 12:49:40.151 [error] Failure during activation. [s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
2024-08-16 12:49:40.151 [error] sendStartupTelemetry() failed. [s [Error]: Failed to resolve env "/home/test_user/anaconda3/envs/test_project"
at ae (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1966134)
at Immediate. (/home/test_user/.vscode/extensions/ms-python.python-2024.12.3-linux-x64/out/client/extension.js:2:1962428)
at process.processImmediate (node:internal/timers:478:21)] {
code: -4,
data: undefined
}
Extension version: 2024.12.3
VS Code version: Code 1.92.1 (eaa41d57266683296de7d118f574d0c2652e1fc4, 2024-08-07T20:16:39.455Z)
OS version: Linux x64 5.10.0-32-amd64
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: