microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.82k stars 29.12k forks source link

Tasks that depend on python environment stopped working. #204920

Closed umnovI closed 8 months ago

umnovI commented 8 months ago

Type: Bug

For some reason all tasks that depend on a python env stopped working, even though they were working perfectly.

 *  Executing task: inv pre-autoupdate 

inv: The term 'inv' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

 *  The terminal process "C:\Program Files\PowerShell\7\pwsh.exe -Command inv pre-autoupdate" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Example:

        {
            "type": "shell",
            "command": [
                "inv pre-autoupdate"
            ],
            // "dependsOn": [
            //  "actenv"
            // ],
            "options": {
                "cwd": "${workspaceFolder}"
            },
            "label": "pre-commit autoupdate",
            "detail": "Check pre-commit hooks for update and commit if was updated",
            "isBackground": false,
            // "runOptions": {
            //  "runOn": "folderOpen"
            // },
            "dependsOrder": "sequence",
            "problemMatcher": [],
        },

Tasks were using python environment and running servers, etc.

VS Code version: Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533, 2024-02-07T09:08:20.941Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 5800H with Radeon Graphics (16 x 3194)| |GPU Status|2d_canvas: enabled
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| |Load (avg)|undefined| |Memory (System)|27.86GB (15.89GB free)| |Process Argv|--folder-uri file:///e%3A/projects/pokemon_project --crash-reporter-id 01bfe09d-0674-44f2-89ca-c8d7b1e31919| |Screen Reader|no| |VM|0%|
Extensions (37) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.4.2 vscode-tailwindcss|bra|0.10.5 ruff|cha|2024.10.0 vscode-eslint|dba|2.4.4 python-environment-manager|don|1.2.4 vscode-great-icons|emm|2.1.102 prettier-vscode|esb|10.1.0 file-icons|fil|1.1.0 todo-tree|Gru|0.0.226 kubernetes-yaml-formatter|ken|1.1.0 vsc-python-indent|Kev|1.18.0 git-graph|mhu|1.30.0 vscode-docker|ms-|1.28.0 autopep8|ms-|2023.8.0 debugpy|ms-|2024.1.10371006 pylint|ms-|2023.11.13481007 python|ms-|2024.1.10411917 vscode-pylance|ms-|2024.2.1 jupyter|ms-|2024.1.1 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.338.1 remote-wsl|ms-|0.86.0 live-server|ms-|0.4.13 autodocstring|njp|0.6.1 sqlite-viewer|qwt|0.3.13 jinjahtml|sam|0.20.0 svg-preview|Sim|2.8.3 vscode-taskexplorer|spm|2.13.2 code-spell-checker|str|3.0.1 code-spell-checker-russian|str|2.2.1 icons|tal|3.8.0 vscode-nushell-lang|The|1.8.0 vscode-icons|vsc|12.7.0 markdown-all-in-one|yzh|3.6.2
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 accentitlementsc:30887149 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 fegfb526:30961430 3ef8e399:30949928 bg6jg535:30958357 ```
umnovI commented 8 months ago

Tried in insiders version--got the same issue.

It doesn't use an environment at all, even tho vscode states otherwise.

 *  Executing task: python -m inv pre-autoupdate 

~\AppData\Local\Programs\Python\Python310\python.exe: No module named inv

 *  The terminal process "C:\Program Files\PowerShell\7\pwsh.exe -Command python -m inv pre-autoupdate" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

I've used dependsOn to activate an env before the task. But this doesn't work now either.

umnovI commented 8 months ago

Caused by python extension.