-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve logging for cases where test adapter fails with file (python) not found #10233
Comments
@SonOfDiablo Can you confirm that it works with extension version |
That doesn't work either. |
@SonOfDiablo would it be possible to provide a minimal repro for this. I am not able to repro it locally. |
@karthiknadig I'm not quite sure what you mean? It should also be noted that it's happening with another project I worked on some time back, which also had no issues until now. When asking me to provide "Minimal repro" do you mean example files/code? |
Here is my output for this error. It fails somewhere inside the
|
@dmig-alarstudios I think your issue is different from mine.
Seems like my issue is that it can't execute python.exe for some reason... |
@SonOfDiablo Directory structure could be helpful. Can you check if the path that the error prints out is correct? I am wondering if it is somehow messing up the path when trying to spawn. I am asking about this path: |
I already posted the structure in the original post, but here it is again:
And yes the path to python is correct. |
@SonOfDiablo sorry i missed that. Can you enable source Maps using this command? |
Python Output:
Python Test Log Output:
Developer Tools Console:
I hope this is what you need. |
Just posting to hear if there is any news about this issue? I still can't discover (and thus run) tests through VS Code.. |
Pytest Path was set to just "pytest" I tried changing it to the absolute path (in my case "C:\Users\USERNAME\AppData\Local\Programs\Python\Python38\Scripts\pytest.exe") however that didn't change anything. Also "python.testing.pytestPath" wasn't in my settings.json (not even after changing the settings), so I had to add that manually. The entire settings.json looks like this: {
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestPath": "C:\\Users\\USERNAME\\AppData\\Local\\Programs\\Python\\Python38\\Scripts\\pytest.exe",
"python.testing.pytestArgs": [
"Tests",
"--durations=5"
]
} (I have also tried without "--durations=5", don't really know why it's there though) |
@SonOfDiablo If you didn't see As for the issue itself, I think the next step for us is to improve logging for these cases. |
I did not notice there was a distinction between User and Workspace settings... I feel a bit silly now. I guess I will have to just kick back and wait for improved logging then. Thank you though, for putting this much time and energy into the issue :) |
This error should be more visible with #16769 |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Language Serverpython.languageServer
setting: MicrosoftExpected behaviour
Tests would be discovered and the Tests tab would be populated.
Actual behaviour
An error is thrown by pytest:
Steps to reproduce:
My project structure
The test discovery worked fine yesterday, and works just fine when manually running
outside of VS Code.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: