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

pytest Discovery Error #24755

Open
chemelli74 opened this issue Jan 10, 2025 · 9 comments
Open

pytest Discovery Error #24755

chemelli74 opened this issue Jan 10, 2025 · 9 comments
Assignees
Labels
area-testing triage-needed Needs assignment to the proper sub-team

Comments

@chemelli74
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: v1.96.2
  • OS Version: Windows 11 23H2

Steps to Reproduce:

  1. Open VScode
  2. Clone HomeAssistant dev container
  3. Run pytests discovery

Message:

Image

Full log:

2025-01-10 20:33:30.996 [info] > ~/.local/ha-venv/bin/python ~/.vscode-server/extensions/ms-python.python-2024.22.2-linux-x64/python_files/testing_tools/run_adapter.py discover pytest -- --rootdir ./tests -s --cache-clear --no-cov
2025-01-10 20:33:30.996 [info] cwd: ./tests
2025-01-10 20:45:41.827 [error] Error discovering pytest tests:
 n [Error]: Exception ignored in: <_Py3Utf8Output name=3 encoding='utf8'>
OSError: [Errno 9] Bad file descriptor
Exception ignored in: <_Py3Utf8Output name=3 encoding='utf8'>
OSError: [Errno 9] Bad file descriptor

    at ChildProcess.<anonymous> (/home/vscode/.vscode-server/extensions/ms-python.python-2024.22.2-linux-x64/out/client/extension.js:2:254172)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1104:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

@vs-code-engineering vs-code-engineering bot added the triage-needed Needs assignment to the proper sub-team label Jan 10, 2025
@chemelli74
Copy link
Author

Hi,

solved using "ms-python.python@prerelease" instead of current stable version.

Would be nice to allow specify the prerelease tag for recommendations in extensions.json

@a-lapedriza
Copy link

I also got this error discovering pytests tests and using the python extension pre-release version fixed it.

I wonder if there's a bug with the latest release version?

@legomushroom legomushroom added python Pull requests that update Python code and removed triage-needed Needs assignment to the proper sub-team labels Jan 28, 2025
@legomushroom
Copy link
Member

@chemelli74 thanks for reporting this and sorry for the late response. Wondering if you still seeing the issue with the stable version of the extension?

@eleanorjboyd eleanorjboyd transferred this issue from microsoft/vscode Jan 28, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 28, 2025
@eleanorjboyd
Copy link
Member

Hello! Can you provide your versions for the python extension?

@eleanorjboyd eleanorjboyd removed triage-needed Needs assignment to the proper sub-team python Pull requests that update Python code labels Jan 28, 2025
@eleanorjboyd eleanorjboyd self-assigned this Jan 28, 2025
@eleanorjboyd eleanorjboyd added area-testing info-needed Issue requires more information from poster labels Jan 28, 2025
@chemelli74
Copy link
Author

Working version I'm using is

image

@eleanorjboyd
Copy link
Member

Ok so the issue is that you are seeing is because of the rewrite we had under an experiment which we just turned to be the default behavior (which you are now seeing in the pre-release version). The pre-release now got you on the rewrite which is why it was it fixed.

@a-lapedriza if you are still seeing an issue, please open a new issue in the vscode-python repo and we can look through your issue specifically. Thanks!

@chemelli74
Copy link
Author

This is not solved using latest release:

Image

@eleanorjboyd eleanorjboyd reopened this Jan 30, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 30, 2025
@eleanorjboyd
Copy link
Member

Are you able to try it on the pre-release? It is not out on the latest stable version: version 2024.22.2

@chemelli74
Copy link
Author

Are you able to try it on the pre-release? It is not out on the latest stable version: version 2024.22.2

Sorry, I don't get the question.
I already reported that using pre-release it works fine.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

5 participants