Skip to content
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

2024.20.0 python extension is unable to find poetry virtual environment if workspace is on a different drive than C (virtual env is cached on different drive than workspace) #24525

Open
kompre opened this issue Dec 3, 2024 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@kompre
Copy link

kompre commented Dec 3, 2024

Type: Bug

EDIT 2024/12/04: Upon revision I had to go back to version v2024.10.0 for virtual env to be detected on mapped drive, no solution for samba share type path

Behaviour

I'm using poetry to handle virtual environment and prior to version 2024.20.0 2024.10.0? of the python extension, all worked fine.

With the 2024.20.0 vscode it's unable to find the virtual environment if the the workspace is located in a different drive than the C:\. I've tried with creating a workspace on D:\ (a partition on the same sdd) (actually this works), on Z:\ (a mapped drive), and on \\fileserver\ (a samba drive on the network): nothing work except for a workspace on the C:\ drive (which is where the main OS is installed, and so python and the poetry cache)

Each of the above case used to work, and indeed downgrading to earlier version (2024.18.1 v2024.10.0) fix the issue for mapped drive (samba share \\fileserver\ still missing in action).

Steps to reproduce:

to NOT detect poetry virtual env

  1. upgrade to version 2024.20.0 of python extension
  2. create a workspace on a MAPPED drive different from where python is installed and poetry cache are installed.
  3. create a virtual environment with poetry in the workspace
  4. go to the python tab in vscode and check that no virtual environment is detected.

to detect poetry virtual env

  1. downgrade python extension to v2024.10.0
  2. virtual env is present

Image

Image

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2024-12-03 18:10:11.391 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-12-03 18:10:11.391 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-12-03 18:10:11.391 [info] Experiment 'pythonTestAdapter' is active
2024-12-03 18:10:11.391 [info] Native locator: Refresh started
2024-12-03 18:10:11.391 [info] > pyenv which python
2024-12-03 18:10:11.391 [info] cwd: d:\verifica impianti appesi
2024-12-03 18:10:11.396 [info] Poetry environment manager found at: c:\users\s.follador\.local\bin\poetry.exe
2024-12-03 18:10:11.398 [info] Native locator: Refresh finished in 354 ms
2024-12-03 18:10:11.404 [info] Running installed packages checker:  {
  id: 'C:\\Users\\s.follador\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\gvia-PlAX_Yoa-py3.12\\Scripts\\python.exe',
  sysPrefix: 'C:\\Users\\s.follador\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\gvia-PlAX_Yoa-py3.12',
  envType: 'Venv',
  envName: 'gvia-PlAX_Yoa-py3.12',
  envPath: 'C:\\Users\\s.follador\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\gvia-PlAX_Yoa-py3.12\\Scripts\\python.exe',
  path: 'C:\\Users\\s.follador\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\gvia-PlAX_Yoa-py3.12\\Scripts\\python.exe',
  architecture: 3,
  sysVersion: '',
  version: {
    raw: '3.12.4',
    major: 3,
    minor: 12,
    patch: 4,
    build: [],
    prerelease: []
  },
  displayName: "Python 3.12.4 ('gvia-PlAX_Yoa-py3.12')",
  detailedDisplayName: "Python 3.12.4 ('gvia-PlAX_Yoa-py3.12')",
  type: 'Virtual'
} c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.20.0-win32-x64\python_files\installed_check.py d:\verifica impianti appesi\pyproject.toml
2024-12-03 18:10:11.404 [info] > ~\AppData\Local\pypoetry\Cache\virtualenvs\gvia-PlAX_Yoa-py3.12\Scripts\python.exe ~\.vscode\extensions\ms-python.python-2024.20.0-win32-x64\python_files\installed_check.py "d:\verifica impianti appesi\pyproject.toml"
2024-12-03 18:10:11.404 [info] Python interpreter path: ~\AppData\Local\pypoetry\Cache\virtualenvs\gvia-PlAX_Yoa-py3.12\Scripts\python.exe
2024-12-03 18:10:11.723 [info] > ~\AppData\Local\Programs\Python\Python312\python.exe ~/.vscode/extensions/ms-python.python-2024.20.0-win32-x64/python_files/printEnvVariables.py
2024-12-03 18:10:11.723 [info] shell: powershellCore
2024-12-03 18:10:11.917 [info] Setting environment variable PATHEXT in collection to .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-12-03 18:10:11.918 [info] Setting environment variable PSMODULEPATH in collection to C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-12-03 18:10:11.918 [info] Prepending environment variable PATH in collection to c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.20.0-win32-x64\python_files\deactivate\powershell;C:\Users\s.follador\AppData\Local\pypoetry\Cache\virtualenvs\gvia-PlAX_Yoa-py3.12\Scripts;C:\Program Files\BraveSoftware\Brave-Browser\Application;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\intel64\libfabric\bin\;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\intel64\libfabric\bin\utils;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\intel64\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\ia32;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\intel64;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Common Files\Concrete\Maintenance;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\gs\gs10.04.0\bin;C:\Program Files\WireGuard\;C:\Program Files\PowerShell\7\;C:\Program Files\Docker\Docker\resources\bin;C:\Users\s.follador\AppData\Local\Programs\Quarto\bin;C:\Users\s.follador\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\s.follador\AppData\Local\Programs\Python\Python312\;C:\Users\s.follador\AppData\Local\Programs\Python\Launcher\;C:\Users\s.follador\AppData\Local\Microsoft\WindowsApps;C:\Users\s.follador\AppData\Local\Programs\Microsoft VS Code\bin;c:\users\s.follador\appdata\roaming\python\python312\scripts;c:\users\s.follador\.local\bin;C:\Program Files\SumatraPDF; {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-12-03 18:10:11.918 [info] Send text to terminal: & C:/Users/s.follador/AppData/Local/Programs/Python/Python312/python.exe c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.20.0-win32-x64\python_files\printEnvVariablesToFile.py c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.20.0-win32-x64\python_files\deactivate\powershell\envVars.txt
2024-12-03 18:10:12.804 [info] Starting Pylance language server.
2024-12-03 18:10:13.969 [info] Native locator: Refresh started
2024-12-03 18:10:13.970 [info] Native locator: Refresh started
2024-12-03 18:10:13.990 [info] Send text to terminal: Get-ChildItem env: | Out-File "C:\Users\S8DA4~1.FOL\AppData\Local\Temp\tmp-286286W6HMNXwdjAQ.txt"
2024-12-03 18:10:14.019 [info] Poetry environment manager found at: c:\users\s.follador\.local\bin\poetry.exe
2024-12-03 18:10:14.043 [info] Native locator: Refresh finished in 79 ms

Extension version: 2024.20.0
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Windows_NT x64 10.0.22631
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.12.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
autoDocstring - Python Docstring Generator njpwerner.autodocstring 0.6.1
Black Formatter ms-python.black-formatter 2024.4.0
Code Spell Checker streetsidesoftware.code-spell-checker 4.0.21
Codeium: AI Coding Autocomplete and Chat for Python, Javascript, Typescript, Java, Go, and more Codeium.codeium 1.24.8
Dev Containers ms-vscode-remote.remote-containers 0.388.0
Django batisteo.vscode-django 1.15.0
Even Better TOML tamasfe.even-better-toml 0.19.2
IntelliCode VisualStudioExptTeam.vscodeintellicode 1.3.2
IntelliCode API Usage Examples VisualStudioExptTeam.intellicode-api-usage-examples 0.2.9
Italian - Code Spell Checker streetsidesoftware.code-spell-checker-italian 1.1.2
JavaScript Debugger ms-vscode.js-debug 1.95.3
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.3
Jinja wholroyd.jinja 0.0.8
Jupyter ms-toolsai.jupyter 2024.10.0
Jupyter Cell Tags ms-toolsai.vscode-jupyter-cell-tags 0.1.9
Jupyter Keymap ms-toolsai.jupyter-keymap 1.1.2
Jupyter Notebook Renderers ms-toolsai.jupyter-renderers 1.0.21
Jupyter Slide Show ms-toolsai.vscode-jupyter-slideshow 0.1.6
Markdown All in One yzhang.markdown-all-in-one 3.6.2
Paste Image mushan.vscode-paste-image 1.0.4
PostScript Language mxschmitt.postscript 1.0.1
PostScript Snippets yingquelou.postscriptsnippets 0.1.2
PowerShell ms-vscode.powershell 2024.4.0
Pylance ms-python.vscode-pylance 2024.11.3
Python ms-python.python 2024.20.0
Python Debugger ms-python.debugpy 2024.12.0
Python Environment Manager donjayamanne.python-environment-manager 1.2.4
Python Extension Pack donjayamanne.python-extension-pack 1.7.0
Python Indent KevinRose.vsc-python-indent 1.18.0
Python Poetry zeshuaro.vscode-python-poetry 0.17.30
Quarto quarto.quarto 1.118.0
Rainbow CSV mechatroner.rainbow-csv 3.13.0
Sumatra Tools lenagain.sumatra-tools 0.0.6
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.10
vscode-pdf tomoki1207.pdf 1.2.2
WSL ms-vscode-remote.remote-wsl 0.88.5
YAML redhat.vscode-yaml 1.15.0
System Info
Item Value
CPUs AMD Ryzen 9 7950X 16-Core Processor (32 x 4491)
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
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.15GB (18.55GB free)
Process Argv --crash-reporter-id dfce97a7-5350-4039-9b7a-52d8f0fe6f9a
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Dec 3, 2024
@karthiknadig
Copy link
Member

@kompre That view is from donjayamanne.python-environment-manager extension, https://github.com/DonJayamanne/vscode-python-manager

The issue still could be in the python extension, can you share the output from "Python Environments" channel?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Dec 3, 2024
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Dec 4, 2024
@kompre
Copy link
Author

kompre commented Dec 4, 2024

Upon revision, the situation seems to be slightly different from what I described yesterday:

  • workspace created on D:\ (different partition on the same sdd) detect poetry virtual env also with version v2024.20.0 of the Python extension
  • for mapped network drive (e.g. \\fileserver\home ---> X:\) I had to go back to v2024.10.0 to actually detect the virtual environment
  • for non mapped network drive (e.g. \\fileserver\home) is still not working (at this point I am doubting it ever worked, and maybe I just misremembering)

I usually work on the D:\ drive and on mapped network drives.

NOTE: I've amended the original post to reflect on my further findings

Python output for v2024.20.0 on mapped drive

2024-12-04 11:58:56.694 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-12-04 11:58:56.694 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-12-04 11:58:56.694 [info] Experiment 'pythonTestAdapter' is active
2024-12-04 11:58:56.694 [info] Native locator: Refresh started
2024-12-04 11:58:56.700 [info] > pyenv which python
2024-12-04 11:58:56.700 [info] cwd: .
2024-12-04 11:58:57.467 [info] Poetry environment manager found at: c:\users\s.follador\.local\bin\poetry.exe
2024-12-04 11:58:57.468 [info] Native locator: Refresh finished in 961 ms
2024-12-04 11:58:57.470 [info] Python interpreter path: ~\AppData\Local\Programs\Python\Python312\python.exe
2024-12-04 11:58:58.543 [info] Starting Pylance language server.
2024-12-04 11:59:02.582 [info] Native locator: Refresh started
2024-12-04 11:59:02.583 [info] Native locator: Refresh started
2024-12-04 11:59:02.604 [info] Send text to terminal: Get-ChildItem env: | Out-File "C:\Users\S8DA4~1.FOL\AppData\Local\Temp\tmp-22416aZr8d62Su8h2.txt"
2024-12-04 11:59:02.608 [info] Poetry environment manager found at: c:\users\s.follador\.local\bin\poetry.exe
2024-12-04 11:59:02.653 [info] Native locator: Refresh finished in 75 ms

Python output for v2024.10.0 on mapped drive

2024-12-04 12:00:10.351 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-12-04 12:00:10.351 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-12-04 12:00:10.352 [info] Experiment 'pythonTestAdapter' is active
2024-12-04 12:00:10.352 [error] Reading directory to watch failed [Error: ENOENT: no such file or directory, scandir 'x:\banana\.pixi\envs'
	at Object.readdirSync (node:fs:1508:26)
	at t.readdirSync (node:electron/js2c/node_init:2:13703)
	at c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:574598
	at c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:574789
	at Array.map (<anonymous>)
	at d.initWatchers (c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:574507)
	at async d.ensureWatchersReady (c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\out\client\extension.js:2:536827)] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'scandir',
  path: 'x:\\banana\\.pixi\\envs'
}
2024-12-04 12:00:10.352 [error] Dir "x:\banana\.pixi\envs" is not watchable (directory does not exist)
2024-12-04 12:00:10.352 [info] Default formatter is set to null for workspace x:\banana
2024-12-04 12:00:10.352 [info] Python interpreter path: ~\AppData\Local\pypoetry\Cache\virtualenvs\banana-9VYD50WC-py3.12\Scripts\python.exe
2024-12-04 12:00:10.358 [info] > pyenv which python
2024-12-04 12:00:10.358 [info] cwd: .
2024-12-04 12:00:11.138 [info] > pixi --version
2024-12-04 12:00:11.138 [error] [Error: spawn pixi ENOENT
	at ChildProcess._handle.onexit (node:internal/child_process:286:19)
	at onErrorNT (node:internal/child_process:484:16)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn pixi',
  path: 'pixi',
  spawnargs: [ '--version' ]
}
2024-12-04 12:00:11.138 [warning] could not find a pixi interpreter for the interpreter at C:\Users\s.follador\AppData\Local\pypoetry\Cache\virtualenvs\banana-9VYD50WC-py3.12\Scripts\python.exe
2024-12-04 12:00:11.176 [info] > & ~/AppData/Local/pypoetry/Cache/virtualenvs/banana-9VYD50WC-py3.12/Scripts/Activate.ps1 ; echo 'e8b39361-0157-4923-80e1-22d70d46dee6' ; python ~/.vscode/extensions/ms-python.python-2024.10.0-win32-x64/python_files/printEnvVariables.py
2024-12-04 12:00:11.176 [info] shell: powershellCore
2024-12-04 12:00:11.486 [info] > ~\AppData\Local\Programs\Python\Python312\python.exe ~/.vscode/extensions/ms-python.python-2024.10.0-win32-x64/python_files/printEnvVariables.py
2024-12-04 12:00:11.486 [info] shell: powershellCore
2024-12-04 12:00:11.690 [info] Prepending environment variable PATH in collection with c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\python_files\deactivate\powershell;C:\Users\s.follador\AppData\Local\pypoetry\Cache\virtualenvs\banana-9VYD50WC-py3.12/Scripts; {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-12-04 12:00:11.690 [info] Setting environment variable VIRTUAL_ENV in collection to C:\Users\s.follador\AppData\Local\pypoetry\Cache\virtualenvs\banana-9VYD50WC-py3.12 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-12-04 12:00:11.690 [info] Setting environment variable VIRTUAL_ENV_PROMPT in collection to banana-py3.12 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-12-04 12:00:11.691 [info] Send text to terminal: & C:/Users/s.follador/AppData/Local/Programs/Python/Python312/python.exe c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\python_files\printEnvVariablesToFile.py c:\Users\s.follador\.vscode\extensions\ms-python.python-2024.10.0-win32-x64\python_files\deactivate\powershell\envVars.txt
2024-12-04 12:00:12.117 [info] Starting Pylance language server.


Python Environment output for v2024.20.0 on mapped drive

Debug: Getting poetry version
Debug: Getting poetry version for poetry
> poetry --version
cwd: ~\.vscode\extensions\donjayamanne.python-environment-manager-1.2.4\out\client
Debug: Shell Exec: poetry --version with options: {
    "cwd": "C:\\Users\\s.follador\\.vscode\\extensions\\donjayamanne.python-environment-manager-1.2.4\\out\\client",
    "throwOnStdErr": true,
    "timeout": 50000,
    "encoding": "utf8",
    "env": {
        "ALLUSERSPROFILE": "C:\\ProgramData",
        "AMDRMPATH": "C:\\Program Files\\AMD\\RyzenMaster\\",
        "APPDATA": "C:\\Users\\s.follador\\AppData\\Roaming",
        "CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\crashpad_21012_VTWOHSXHTBXCGBWE",
        "COMPUTERNAME": "ALFA-4",
        "EFC_10264": "1",
        "ELECTRON_RUN_AS_NODE": "1",
        "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
        "FPS_BROWSER_USER_PROFILE_STRING": "Default",
        "HOMEDRIVE": "C:",
        "HOMEPATH": "\\Users\\s.follador",
        "INTEL_DEV_REDIST": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\",
        "I_MPI_ROOT": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\",
        "LOCALAPPDATA": "C:\\Users\\s.follador\\AppData\\Local",
        "LOGONSERVER": "\\\\ALFA-4",
        "NUMBER_OF_PROCESSORS": "32",
        "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
        "OS": "Windows_NT",
        "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
        "POWERSHELL_DISTRIBUTION_CHANNEL": "MSI:Windows 10 Pro",
        "PROCESSOR_ARCHITECTURE": "AMD64",
        "PROCESSOR_IDENTIFIER": "AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD",
        "PROCESSOR_LEVEL": "25",
        "PROCESSOR_REVISION": "6102",
        "PUBLIC": "C:\\Users\\Public",
        "SESSIONNAME": "Console",
        "TEMP": "C:\\Users\\S8DA4~1.FOL\\AppData\\Local\\Temp",
        "TMP": "C:\\Users\\S8DA4~1.FOL\\AppData\\Local\\Temp",
        "USERDOMAIN": "ALFA-4",
        "USERDOMAIN_ROAMINGPROFILE": "ALFA-4",
        "USERNAME": "s.follador",
        "USERPROFILE": "C:\\Users\\s.follador",
        "VSCODE_CODE_CACHE_PATH": "C:\\Users\\s.follador\\AppData\\Roaming\\Code\\CachedData\\f1a4fb101478ce6ec82fe9627c43efbf9e98c813",
        "VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
        "VSCODE_CWD": "X:\\banana",
        "VSCODE_ESM_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_IPC_HOOK": "\\\\.\\pipe\\dbaaab68-1.95.3-main-sock",
        "VSCODE_NLS_CONFIG": "{\"userLocale\":\"en-us\",\"osLocale\":\"it-it\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"C:\\\\Users\\\\s.follador\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\resources\\\\app\\\\out\\\\nls.messages.json\",\"locale\":\"en-us\",\"availableLanguages\":{}}",
        "VSCODE_PID": "21012",
        "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
        "CommonProgramFiles": "C:\\Program Files\\Common Files",
        "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
        "CommonProgramW6432": "C:\\Program Files\\Common Files",
        "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
        "OneDrive": "C:\\Users\\s.follador\\OneDrive",
        "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",
        "ProgramData": "C:\\ProgramData",
        "ProgramFiles": "C:\\Program Files",
        "ProgramFiles(x86)": "C:\\Program Files (x86)",
        "ProgramW6432": "C:\\Program Files",
        "SystemDrive": "C:",
        "SystemRoot": "C:\\WINDOWS",
        "windir": "C:\\WINDOWS",
        "Path": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\libfabric\\bin\\;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\libfabric\\bin\\utils;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\ia32;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Common Files\\Concrete\\Maintenance;C:\\Program Files\\dotnet\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\gs\\gs10.04.0\\bin;C:\\Program Files\\WireGuard\\;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Quarto\\bin;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Python\\Python312\\;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\s.follador\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;c:\\users\\s.follador\\appdata\\roaming\\python\\python312\\scripts;c:\\users\\s.follador\\.local\\bin;C:\\Program Files\\SumatraPDF;",
        "PYTHONUNBUFFERED": "1",
        "PYTHONIOENCODING": "utf-8"
    }
}
Debug: Getting poetry version
Debug: Getting poetry version for poetry
Debug: Cached data exists KeyPrefix=Cache_Method_Output_Poetry.getVersionCached-Args=
Debug: Time taken to run poetry --version in ms 581
Debug: Found version 1.8.3 for poetry
Debug: Found version 1.8.3 for poetry

Python Environment output for v2024.10.0 on mapped drive

Debug: Getting poetry version
Debug: Getting poetry version for poetry
> poetry --version
cwd: ~\.vscode\extensions\donjayamanne.python-environment-manager-1.2.4\out\client
Debug: Shell Exec: poetry --version with options: {
    "cwd": "C:\\Users\\s.follador\\.vscode\\extensions\\donjayamanne.python-environment-manager-1.2.4\\out\\client",
    "throwOnStdErr": true,
    "timeout": 50000,
    "encoding": "utf8",
    "env": {
        "ALLUSERSPROFILE": "C:\\ProgramData",
        "AMDRMPATH": "C:\\Program Files\\AMD\\RyzenMaster\\",
        "APPDATA": "C:\\Users\\s.follador\\AppData\\Roaming",
        "CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\crashpad_21012_VTWOHSXHTBXCGBWE",
        "COMPUTERNAME": "ALFA-4",
        "EFC_10264": "1",
        "ELECTRON_RUN_AS_NODE": "1",
        "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
        "FPS_BROWSER_USER_PROFILE_STRING": "Default",
        "HOMEDRIVE": "C:",
        "HOMEPATH": "\\Users\\s.follador",
        "INTEL_DEV_REDIST": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\",
        "I_MPI_ROOT": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\",
        "LOCALAPPDATA": "C:\\Users\\s.follador\\AppData\\Local",
        "LOGONSERVER": "\\\\ALFA-4",
        "NUMBER_OF_PROCESSORS": "32",
        "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
        "OS": "Windows_NT",
        "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
        "POWERSHELL_DISTRIBUTION_CHANNEL": "MSI:Windows 10 Pro",
        "PROCESSOR_ARCHITECTURE": "AMD64",
        "PROCESSOR_IDENTIFIER": "AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD",
        "PROCESSOR_LEVEL": "25",
        "PROCESSOR_REVISION": "6102",
        "PUBLIC": "C:\\Users\\Public",
        "SESSIONNAME": "Console",
        "TEMP": "C:\\Users\\S8DA4~1.FOL\\AppData\\Local\\Temp",
        "TMP": "C:\\Users\\S8DA4~1.FOL\\AppData\\Local\\Temp",
        "USERDOMAIN": "ALFA-4",
        "USERDOMAIN_ROAMINGPROFILE": "ALFA-4",
        "USERNAME": "s.follador",
        "USERPROFILE": "C:\\Users\\s.follador",
        "VSCODE_CODE_CACHE_PATH": "C:\\Users\\s.follador\\AppData\\Roaming\\Code\\CachedData\\f1a4fb101478ce6ec82fe9627c43efbf9e98c813",
        "VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
        "VSCODE_CWD": "X:\\banana",
        "VSCODE_ESM_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_IPC_HOOK": "\\\\.\\pipe\\dbaaab68-1.95.3-main-sock",
        "VSCODE_NLS_CONFIG": "{\"userLocale\":\"en-us\",\"osLocale\":\"it-it\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"C:\\\\Users\\\\s.follador\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\resources\\\\app\\\\out\\\\nls.messages.json\",\"locale\":\"en-us\",\"availableLanguages\":{}}",
        "VSCODE_PID": "21012",
        "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
        "CommonProgramFiles": "C:\\Program Files\\Common Files",
        "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
        "CommonProgramW6432": "C:\\Program Files\\Common Files",
        "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
        "OneDrive": "C:\\Users\\s.follador\\OneDrive",
        "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",
        "ProgramData": "C:\\ProgramData",
        "ProgramFiles": "C:\\Program Files",
        "ProgramFiles(x86)": "C:\\Program Files (x86)",
        "ProgramW6432": "C:\\Program Files",
        "SystemDrive": "C:",
        "SystemRoot": "C:\\WINDOWS",
        "windir": "C:\\WINDOWS",
        "Path": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\java8path;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\libfabric\\bin\\;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\libfabric\\bin\\utils;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\ia32;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\intel64;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Common Files\\Concrete\\Maintenance;C:\\Program Files\\dotnet\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\gs\\gs10.04.0\\bin;C:\\Program Files\\WireGuard\\;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Quarto\\bin;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Python\\Python312\\;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\s.follador\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\s.follador\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;c:\\users\\s.follador\\appdata\\roaming\\python\\python312\\scripts;c:\\users\\s.follador\\.local\\bin;C:\\Program Files\\SumatraPDF;",
        "PYTHONUNBUFFERED": "1",
        "PYTHONIOENCODING": "utf-8"
    }
}
Debug: Time taken to run poetry --version in ms 589
Debug: Found version 1.8.3 for poetry
Debug: Getting poetry version
Debug: Getting poetry version for poetry
Debug: Cached data exists KeyPrefix=Cache_Method_Output_Poetry.getVersionCached-Args=
Debug: Found version 1.8.3 for poetry

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Dec 4, 2024
@karthiknadig
Copy link
Member

@kompre In your settings do you have python.venvFolders set? And what does it say for the python.locator setting?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Dec 4, 2024
@karthiknadig karthiknadig self-assigned this Dec 4, 2024
@kompre
Copy link
Author

kompre commented Dec 4, 2024

I've upgraded again to v2024.20.0 and checked:

  • in settings.json (user settings) there is no python.venvFolders or python.locator
  • in defaultsettings.json (default settings):
    • `"python.locator": "native",`
      
    • `"python.venvFolders": [],`
      
  • in .vscode/settings.json (folder settings) there is nothing, literally empty
  • in .code-workspace (workspace settings) there is only this:

{
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {}
}

To be sure I've downgraded to v2024.10.0 but didn't notice any change in user settings.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Dec 4, 2024
@arthurgailes
Copy link

arthurgailes commented Dec 12, 2024

Also having this problem, fixed by downgradeing to 2024.10. Tried adding the condapath and default interpretter to my workspace settings, nothing. Clicking on a virtual environment on a mapped drive produces a failed to initialize error.

{
"python.condaPath": "W:\[...]\Miniforge3\Scripts\conda.exe",
"python.defaultInterpreterPath": "W:/[.../venv/python.exe"
}

@karthiknadig
Copy link
Member

Can you also share the logs from Output > Python locator? This looks like the native locator (pet ) is not getting the right defaults to poetry or conda in these cases.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Dec 12, 2024
@karthiknadig karthiknadig self-assigned this Dec 12, 2024
@DonJayamanne DonJayamanne removed their assignment Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants