Closed as not planned
Description
Type: Bug
Behaviour
Expected vs. Actual
Expected that the testing sidebar shows all python tests that are available.
The directory used here is using pixi as package manager, and not conda. Somehow this folder is identified as a conda folder and the ms-python plugin tries to call conda, which is indeed installed on my computer and in my PATH. ms-python should not try to call conda run. I have set up my environment myself my opening visual studio code in a pixi shell.
Actual, I receive an error DirectoryNotACondaEnvironmentError
Steps to reproduce:
- I call
pixi run code .
to open my VS code project - I go to the Testing tab to check for pytest tests
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.6
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda (actually pixi, but conda seems to be found and used)
- Value of the
python.languageServer
setting: Default - I have
"python.terminal.activateEnvironment": false,
in my personal settings. - I have tried the pre-release and the stable version
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
2023-12-01 15:51:35.304 [info] ResultResolver EOT received for discovery.
2023-12-01 15:51:35.304 [info] Disposing data receiver for c:\Users\X\Source\Repos\PROJECT and deleting UUID; pytest discovery.
2023-12-01 15:54:07.346 [info] Discover tests for workspace name: PROJECT - uri: c:\Users\X\Source\Repos\PROJECT\.vscode\settings.json
2023-12-01 15:54:07.346 [info] Running discovery for pytest using the new test adapter.
2023-12-01 15:54:07.346 [info] All environment variables set for pytest discovery for workspace [LEFT OUT BY POSTER]
2023-12-01 15:54:07.353 [info] > conda run -p .\.pixi\env --no-capture-output python ~\.vscode\extensions\ms-python.python-2023.21.13351006\pythonFiles\get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2023.21.13351006/pythonFiles/printEnvVariables.py
2023-12-01 15:54:07.353 [info] shell: commandPrompt
2023-12-01 15:54:08.392 [error] getActivatedEnvironmentVariables Error: Command failed: conda run -p C:\Users\X\Source\Repos\PROJECT\.pixi\env --no-capture-output python c:\Users\X\.vscode\extensions\ms-python.python-2023.21.13351006\pythonFiles\get_output_via_markers.py c:/Users/X/.vscode/extensions/ms-python.python-2023.21.13351006/pythonFiles/printEnvVariables.py
DirectoryNotACondaEnvironmentError: The target directory exists, but it is not a conda environment.
Use 'conda create' to convert the directory to a conda environment.
target directory: C:\Users\X\Source\Repos\PROJECT\.pixi\env
at ChildProcess.exithandler (node:child_process:431:12)
at ChildProcess.emit (node:events:525:35)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
code: 1,
killed: false,
signal: null,
cmd: 'conda run -p C:\\Users\\X\\Source\\Repos\\PROJECT\\.pixi\\env --no-capture-output python c:\\Users\\X\\.vscode\\extensions\\ms-python.python-2023.21.13351006\\pythonFiles\\get_output_via_markers.py c:/Users/X/.vscode/extensions/ms-python.python-2023.21.13351006/pythonFiles/printEnvVariables.py'
}
User Settings
languageServer: "Pylance"
testing
• pytestEnabled: true
terminal
• activateEnvironment: false
Extension version: 2023.21.13351006
VS Code version: Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:51:52.184Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
Item | Value |
---|---|
CPUs | 12th Gen Intel(R) Core(TM) i5-1235U (12 x 2496) |
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 video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
Load (avg) | undefined |
Memory (System) | 15.64GB (4.32GB free) |
Process Argv | . --crash-reporter-id 896f8136-38e6-4d41-88b0-79e91aef99a1 |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30899288
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
3biah626:30602489
f6dab269:30613381
2i9eh265:30646982
showlangstatbar:30737416
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialog:30910333
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232