You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I previously had a .venv folder that was made in the root of my project.
I deleted that .venv folder from my project root, after realizing that I needed to use the real Python local environment in my particular case for concurrency testing of a project (which needed native libs and local environment for concurrency performance testing with locust and psycopg).
After deleting the .venv folder, I now get an error starting the extension I think whenever I open the project and click on a .py file:
Sorry, something went wrong activating IntelliCode support for Python. Please check the "Python" and "VS IntelliCode" output windows for details.
and when inspecting the Python output window as requested, I can see the following error:
2024-12-14 08:24:55.669 [info] Experiment 'pythonaacf' is active
2024-12-14 08:24:55.669 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-12-14 08:24:55.669 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-12-14 08:24:55.669 [info] Experiment 'pythonTestAdapter' is active
2024-12-14 08:24:55.669 [info] Native locator: Refresh started
2024-12-14 08:24:55.669 [info] Native locator: Refresh started
2024-12-14 08:24:55.669 [info] > pyenv which python
2024-12-14 08:24:55.669 [info] cwd: .
2024-12-14 08:24:56.185 [info] Native locator: Refresh finished in 1131 ms
2024-12-14 08:24:56.190 [error] [
'getActivatedEnvironmentVariables, Class name = M, completed in 120ms, has a falsy return value, Arg 1: <Uri:f:\\GitHubRepos\\various-text-projects>, Arg 2: undefined, Arg 3: undefined, Arg 4: "C:\\\\Program Files\\\\PowerShell\\\\7\\\\pwsh.exe"',
[l [Error]: Failed to resolve env "f:\\GitHubRepos\\various-text-projects\\.venv\\Scripts\\python.exe"
Upon inspecting further this morning, I looked into my Code - Insiders/User/globalStorage/ms-python.python/pythonLocator folder and saw the latest JSON still having the setting for the \.venv\ folder that I had manually deleted:
Rather than having the "Reactivating Terminals..." notification stay in a busy loop, I would have expected that upon starting the extension, that I would get a WARNING notification that would say something like:
Could not find Python in the environment prefix F:\\GitHubRepos\\various-text-projects\\.venv. Perhaps the environment was relocated, or you have deleted it? Click to choose the new environment path where your Python executable is located to update your user/workspace setting.
or perhaps earlier directly inside getActivatedEnvironmentVariables ?
I would not expect the Python extension to automatically change to PYTHONHOME if found, but it would be nice perhaps for it to offer that as a further suggestion:
Could not find Python in the environment prefix F:\\GitHubRepos\\various-text-projects\\.venv. Perhaps the environment was relocated, or you have deleted it? Click to choose the new environment path where Python executable is located or Choose to use existing PYTHONHOME that was found.
Extension version: 2024.23.2024121201
VS Code version: Code - Insiders 1.97.0-insider (b425f4802fcbcccb11ad991208fa262c06255be3, 2024-12-13T05:04:19.453Z)
OS version: Windows_NT x64 10.0.26100
Modes:
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)
thadguidry
changed the title
[error] sendStartupTelemetry() failed. [Error]: Failed to resolve env .venv\\Scripts\\python.exe
Manually deleted /.venv/ path in project folder breaks startup permanently without providing a guide
Dec 14, 2024
Type: Bug
.venv
folder that was made in the root of my project..venv
folder from my project root, after realizing that I needed to use the real Python local environment in my particular case for concurrency testing of a project (which needed native libs and local environment for concurrency performance testing with locust and psycopg)..venv
folder, I now get an error starting the extension I think whenever I open the project and click on a.py
file:Sorry, something went wrong activating IntelliCode support for Python. Please check the "Python" and "VS IntelliCode" output windows for details.
and when inspecting the Python output window as requested, I can see the following error:
Upon inspecting further this morning, I looked into my
Code - Insiders/User/globalStorage/ms-python.python/pythonLocator
folder and saw the latest JSON still having the setting for the\.venv\
folder that I had manually deleted:Expected Handling
Rather than having the "Reactivating Terminals..." notification stay in a busy loop, I would have expected that upon starting the extension, that I would get a WARNING notification that would say something like:
Could not find Python in the environment prefix
F:\\GitHubRepos\\various-text-projects\\.venv
. Perhaps the environment was relocated, or you have deleted it? Click to choose the new environment path where your Python executable is located to update your user/workspace setting.It seems like there should be more done under
vscode-python/src/client/terminals/envCollectionActivation/indicatorPrompt.ts
Line 45 in 2c801b8
getActivatedEnvironmentVariables
?I would not expect the Python extension to automatically change to PYTHONHOME if found, but it would be nice perhaps for it to offer that as a further suggestion:
Could not find Python in the environment prefix
F:\\GitHubRepos\\various-text-projects\\.venv
. Perhaps the environment was relocated, or you have deleted it? Click to choose the new environment path where Python executable is located or Choose to use existing PYTHONHOME that was found.Extension version: 2024.23.2024121201
VS Code version: Code - Insiders 1.97.0-insider (b425f4802fcbcccb11ad991208fa262c06255be3, 2024-12-13T05:04:19.453Z)
OS version: Windows_NT x64 10.0.26100
Modes:
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: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: