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

After upgrading to 1.85.0 tests expolorer for python is broken #200523

Closed
royby-cyberark opened this issue Dec 11, 2023 · 6 comments
Closed

After upgrading to 1.85.0 tests expolorer for python is broken #200523

royby-cyberark opened this issue Dec 11, 2023 · 6 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@royby-cyberark
Copy link

royby-cyberark commented Dec 11, 2023

Type: Bug

I have a python project in vscode with a working virtual environment.
everything was working a moment ago, and after I upgraded to 1.85.0 and verifying that the virtual env is activated and the python interpreter is selected correctly, if I open the test explorer ("Testing") on the side bar, then I see this:

"No Tests have been found in this workspace yet. Configure a test framework to see your tests here."

If I try to click on "Configure Python Tests", select pytest and the tests folder, I get an error: "There is no Pip installer available in the selected environment."
but running "which pip" in the vscode terminal shows the pip in the virtual environment.

Thank you for your help.

VS Code version: Code 1.85.0 (af28b32, 2023-12-06T18:17:50.719Z)
OS version: Darwin arm64 23.1.0
Modes:

System Info
Item Value
CPUs Apple M1 Max (10 x 24)
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) 6, 5, 5
Memory (System) 64.00GB (20.13GB free)
Process Argv --crash-reporter-id 1c79a628-412e-426e-98ba-40807c48bec8
Screen Reader no
VM 0%
Extensions (23)
Extension Author (truncated) Version
Bookmarks ale 13.4.2
aws-toolkit-vscode ama 2.2.0
gitlens eam 14.5.2
copilot Git 1.141.0
copilot-chat Git 0.11.0
todo-tree Gru 0.0.226
prettify-json moh 0.0.3
vscode-docker ms- 1.28.0
pylint ms- 2023.10.1
python ms- 2023.22.0
vscode-pylance ms- 2023.11.10
jupyter ms- 2023.11.1003402403
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.327.0
autodocstring njp 0.6.1
material-icon-theme PKi 4.32.0
copy-copy-paste roc 0.0.7
code-spell-checker str 3.0.1
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30899288
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
3biah626:30602489
89544117:30613380
a9j8j154:30646983
showlangstatbar:30737416
0bi6i642:30917235
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
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019:30917259

@royby-cyberark
Copy link
Author

royby-cyberark commented Dec 11, 2023

I have additional reproduction details
TL;DR - it works in a clean venv with python 3.11.5, but doesn't work with a clean venv with python 3.8.

Full details:

Using python 3.8.16:

  • in a new folder, python -m venv .venv
  • source .venv/bin/activate
  • pip install pytest
  • which python - ...test-vscode/.venv/bin/python
  • python --version - Python 3.8.16
  • open vscode - verify interpreter is selected correctly from the venv
  • create a folder "tests" and in it test_dummy.py and in it a dummy test
  • can't find tests with the above error, I think it doesn't find the pytest in the venv

Using python 3.11.5:

  • (i'm using pyenv): pyenv shell 3.11.5
  • in a new folder, python -m venv .venv
  • source .venv/bin/activate
  • pip install pytest
  • which python - ...test-vscode/.venv/bin/python
  • python --version - Python 3.11.5
  • open vscode - verify interpreter is selected correctly from the venv
  • create a folder "tests" and in it test_dummy.py and in it a dummy test
  • works great

@royby-cyberark
Copy link
Author

royby-cyberark commented Dec 11, 2023

Some other things that may or may not be related:

  1. in the working 3.11 venv I see this under the "output", "Extension Host" - without errors:
    2023-12-11 13:38:07.691 [info] ExtensionService#_doActivateExtension ms-python.pylint, startup: false, activationEvent: 'onLanguage:python'
    2023-12-11 13:38:07.701 [info] ExtensionService#_doActivateExtension ms-python.vscode-pylance, startup: false, activationEvent: 'onLanguage:python'

  2. in the non working 3.8 venv I see this under the "output", "Extension Host" - with errors:
    2023-12-11 13:38:07.691 [info] ExtensionService#_doActivateExtension ms-python.pylint, startup: false, activationEvent: 'onLanguage:python'
    2023-12-11 13:38:07.701 [info] ExtensionService#_doActivateExtension ms-python.vscode-pylance, startup: false, activationEvent: 'onLanguage:python'
    ...
    2023-12-11 13:49:25.455 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
    2023-12-11 13:49:32.400 [error] Error: spawn /Users/.../dev/test-vscode/.venv EACCES
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Not sure what is this related to. its after the "vscode.typescript-language-features", but failing to spawn the.... .venv folder?
not sure, but since these seem to be venv related issues them maybe its a clue

@gjsjohnmurray
Copy link
Contributor

/extPython

@vscodenpa
Copy link

It looks like this is caused by the Python extension. Please file the issue to the Python extension repository. Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.

Happy Coding!

@vscodenpa vscodenpa added the *caused-by-extension Issue identified to be caused by an extension label Dec 11, 2023
@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
@royby-cyberark
Copy link
Author

There is an open issue in the python ext repo in case someone gets here:
microsoft/vscode-python#22618

@eff917
Copy link

eff917 commented Dec 11, 2023

Can confirm, downgrading python extension to 2023.20 "fixes" the issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

5 participants