-
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
Extension launching fails: Failed to resolve env #24644
Comments
Can you try running the command “Python: clear cache and reload” from the container to see if it behaves better? Please also share the logs from: Output > Python Locator |
Hello, Seems like I cannot reproduce this problem that had been bothering me for at least two weeks before I posted this issue... Thank you anyway, and sorry for the inconvenience. |
This issue can occur due to some caching bug in the python extension. I am trying to narrow it down, but it has been one of those bugs that is hard to reproduce. If it does occur again, try |
Hello again, I faced this issue once more, here are the logs from Output > Python Locator if you want to do anything. 2025-01-14 13:43:47.996 [info] Starting Python Locator /app/.vscode-server/extensions/ms-python.python-2024.22.2-linux-x64/python-env-tools/bin/pet server |
@CharlesGaldin Did you try running |
Type: Bug
I am using several devcontainers and the python extenstion inside them.
Inside my container, I fail to launch the python extension because the env used in another one cannot be found in this one:
However, i can fix this issue by setting the python locator to "js" in my settings: "python.locator": "js", but need to rebuild each one of my containers with this option...
2024-12-20 08:57:45.334 [info] Native locator: Refresh started
2024-12-20 08:57:45.339 [info] Poetry environment manager found at: /app/.local/bin/poetry
2024-12-20 08:57:45.357 [info] Native locator: Refresh finished in 662 ms
2024-12-20 08:57:45.371 [error] Python Extension: interpreterManager.refresh [l [Error]: Failed to resolve env "/home/airflow/.local/bin/python"
at ae (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2037533)
at oe (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2035493)
at Immediate. (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2031787)
at process.processImmediate (node:internal/timers:483:21)] {
code: -4,
data: undefined
}
2024-12-20 08:57:45.663 [info] > pyenv which python
2024-12-20 08:57:45.663 [info] cwd: .
2024-12-20 08:57:45.868 [error] [
'getActivatedEnvironmentVariables, Class name = M, completed in 1ms, has a falsy return value, Arg 1: Uri:/app/workspace, Arg 2: undefined, Arg 3: undefined, Arg 4: "/bin/zsh"',
[l [Error]: Failed to resolve env "/home/airflow/.local/bin/python"
at ae (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2037533)
at oe (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2035493)
at Immediate. (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2031787)
at process.processImmediate (node:internal/timers:483:21)] {
code: -4,
data: undefined,
vslsStack: [ CallSite {}, CallSite {}, CallSite {}, CallSite {} ]
}
]
2024-12-20 08:57:45.868 [error] Failed to apply terminal env vars undefined [l [Error]: Failed to resolve env "/home/airflow/.local/bin/python"
at ae (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2037533)
at oe (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2035493)
at Immediate. (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2031787)
at process.processImmediate (node:internal/timers:483:21)] {
code: -4,
data: undefined,
vslsStack: [ CallSite {}, CallSite {}, CallSite {}, CallSite {} ]
}
2024-12-20 08:57:45.869 [error] [
'Failed to activate a workspace, Class name = v, completed in 1006ms, has a falsy return value, Arg 1: Uri:/app/workspace, Arg 2: {"started":1734685064672}, Return Value: undefined',
[l [Error]: Failed to resolve env "/home/airflow/.local/bin/python"
at ae (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2037533)
at oe (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2035493)
at Immediate. (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2031787)
at process.processImmediate (node:internal/timers:483:21)] {
code: -4,
data: undefined,
vslsStack: [ CallSite {}, CallSite {}, CallSite {}, CallSite {} ]
}
]
2024-12-20 08:57:45.869 [error] Failure during activation. [l [Error]: Failed to resolve env "/home/airflow/.local/bin/python"
at ae (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2037533)
at oe (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2035493)
at Immediate. (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2031787)
at process.processImmediate (node:internal/timers:483:21)] {
code: -4,
data: undefined,
vslsStack: [ CallSite {}, CallSite {}, CallSite {}, CallSite {} ]
}
2024-12-20 08:57:45.869 [error] sendStartupTelemetry() failed. [l [Error]: Failed to resolve env "/home/airflow/.local/bin/python"
at ae (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2037533)
at oe (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2035493)
at Immediate. (/app/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/out/client/extension.js:2:2031787)
at process.processImmediate (node:internal/timers:483:21)] {
code: -4,
data: undefined,
vslsStack: [ CallSite {}, CallSite {}, CallSite {}, CallSite {} ]
}
2024-12-20 08:57:46.929 [info] > conda info --json
2024-12-20 08:57:47.443 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/python_files/printEnvVariables.py
2024-12-20 08:57:47.443 [info] shell: bash
2024-12-20 08:57:47.447 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode-server/extensions/ms-python.python-2024.22.0-linux-x64/python_files/printEnvVariables.py
2024-12-20 08:57:47.447 [info] shell: bash
2024-12-20 08:57:59.446 [info] Native locator: Refresh started
2024-12-20 08:57:59.473 [info] Poetry environment manager found at: /app/.local/bin/poetry
2024-12-20 08:57:59.532 [info] Native locator: Refresh finished in 86 ms
Extension version: 2024.22.0
VS Code version: Code 1.96.0 (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Linux x64 6.8.0-50-generic
Modes:
Remote OS version: Linux x64 6.8.0-50-generic
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: