-
Notifications
You must be signed in to change notification settings - Fork 767
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
Diagnostics appear in stdlib in open file mode with Windows Store interpreter #1782
Comments
These files should not have diagnostics by default, so this sounds like a bug or misconfiguration. You didn't fill out our template; can you please provide info per https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue and your configuration? |
I apologize for not giving the necessary details; I have chosen the question preset, which did not have the necessary. Python extension version: v2021.9.1191016588 Python version: 3.9.7 from Microsoft store. |
Those are the logs from the Python extension; can you provide trace logs from the "Python Language Server" output window instead? The instructions I linked above should show how to enable and find them. |
Sorry, I way to often skim texts instead of reading them. |
Ah, you're using open file mode. We have to know which files are actually user files (to know to ignore diagnostics in certain files), but that seems to be breaking with this interpreter. Normally, we exclude the interpreter's path, but it looks like the way the Windows Store installed version of Python is laid out is confusing that logic. You should be able to work around this by opening a folder instead of a single file, which should more clearly help us define which files are actually in the workspace and which aren't. |
I had sadly encountered this problem in a folder workspace. The original screenshot was took in one. However I was, for whatever reason, not able to trigger the problem in either a workspace or in a file, not even on the projects from which the logs and the original screenshot were taken. |
I see, that does confuse things. You're saying that you can't reproduce it anymore? We did do a release yesterday afternoon; potentially it was fixed. |
I had encountered it today, the logs were taken about the time I had uploaded them. VS code crashed (perhaps the debug messages were to much for this poor laptop) and after that I was not able to reproduce the errors. Perhaps it did update after the crash? |
Your crash in the original logs looked like #1586, which should be better handled next week, but would have only caused crashes in open-file mode. |
VS code crashed after those logs were created. When the crash occurred, I had multiple vscode windows open, a mix of files and workspaces. I'm afraid this is how much I have the energy to do today, so I will do more testing tomorrow. |
I have experienced the bug again. I believe it is triggered when using tab complete on a import statement. |
@jakebailey I apologize for the tagging you, but I have provided additional details. |
I'm not sure what I'm seeing in the above; your original issue was about diagnostics appearing in the stdlib, but the above doesn't show that. It seems to show some other diagnostic issue in the file where the diagnostic is in the wrong place (which isn't good either, of course). |
I don't think the issue is were the library is placed, just using tab complete on it. The diagnostics were from the locally installed library (sorry for not showing it directly) I had imported. I can do it again with other libraries, if necessary, as now I know exactly hot to trigger it. |
@MinekPo1, it has been a while and I'm wondering if you are still seeing this issue? |
@MinekPo1 this issue contains multiple issues making it hard to answer. the original issue is by design. we will show errors for any file that are explicitly opened in the editor.
for second issue linked #1782 (comment) |
I have not opened any files from unittest. I have however opened a new issue microsoft/vscode-python#18953 I apologize that I have not added the proper info in this issue, however this was the first time I had approached such a system. |
The problems tab is flooded by errors in libraries I have imported in my project (in this case unittest).
Is this intended behavior? If yes, how can I disable it, its really getting in my way.
The text was updated successfully, but these errors were encountered: