-
Notifications
You must be signed in to change notification settings - Fork 770
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
Pylance crashed immediately after open VSCode #5009
Comments
Getting the same error Environment dataLanguage Server version: v2023.10.41 |
My cache would be here: Worth a try to see if somehow that's breaking things, but the callstack on the original poster isn't indicating a read from the cache. So we're not sure what's happening. |
Ran into the same error on Python 3.8.10, Pylance v2023.10.50.
I removed my falsely concluded comment about how renaming workspace fixes it. Turned out it was due to that VSCode selected another Python interpreter on my system (3.11.4) by default, which Pylance runs fine with. |
Hmm, the failure indicates the return value of statSync (which is a call into the node fs library eventually) is not returning the correct type of object. This might happen if the site-packages folder has a zip/egg. Which might explain how it works in one environment and not another. The weird part is we haven't changed that code in a long time, so not sure how it would have worked before. 6 months ago was the last update. |
Similar issue, although mine "restarts" instead of stopping. Pylance was working fine all day up until 2 hours ago:
It works fine on my python environment with no egg package, but crashes in my Any debugging advice? |
This is happening for me as well, and I ensured it isn't anything else by removing all extensions and reinstalling. Here is a complete log of what happened after my last window reload:
Complete output:
|
Same error for me. Environment dataLanguage Server version: v2023.10.50 |
I checked my site-package folder, I do have egg in that folder. |
me too, even if a simple python file...I use miniconda (Python 3.11.5, base environment). For me, temporarily fixed by rolling back the extension to v2023.10.40 too.
|
Thanks all. We're able to repro this and are working on a fix. Repro steps:
Here's a zip containing the |
This issue has been fixed in prerelease version 2023.10.53, which we've just released. You can find the changelog here: CHANGELOG.md |
@darynwhite, based on your log above it looks like you're hitting a different error. Is this still what you're seeing? If so, can you open a new issue? And provide some details on your setup so we can try to repro this ourselves? Do you hit this with notebooks or normal python files? Are you using a remote environment of some sort -- WSL, SSH, dev container, etc?
|
That is what I'm seeing, I'll open new issue based on what I'm seeing. |
I had the same issue, reverting to the .40 released fixed it |
same issue for me |
I had the same issue: |
Python version: 3.11.4
I have the same issue with the latest version (v2023.10.50) of pylance: 2023-11-02 12:04:19.748 [info] [Error - 12:04:19 PM] The Pylance server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information. |
Just restating that this issue is fixed in our latest prerelease build -- 2023.10.53. cc: @ajromanelli, @wakusoftware, @kaern, @HenraL |
How long does ir take for vscode to see the new version? Because currently, the latest version for them is v2023.10.50. Edit: sorry, didn't see that we needed to switch to pre-release |
@RisingLiberty what's the error message that Pylance is giving? |
It doesn't print anything to the console actually, the only thing I see at the end of a restart is the following there's also an error about a redundant open text document command for the file I'm editing, but I assume that's just warning? after I've changed the file, notthing else gets emitted to the output console in vscode |
You might also try setting this: "python.analysis.logLevel": "Trace" |
not sure if it helps but the code above the changed lines still highlights as expected, it's only the new code and the lines below that gets messed up. In there I've found a few references like this |
It updated to prerelease and it worked. Thanks |
@RisingLiberty, No that shouldn't affect this. Your problem sounds similar to this: microsoft/pyright#6280 We should probably open a new issue to investigate. I believe the crash is fixed, otherwise hover on |
Alright, no problem, thanks for the help, great stuff :) |
Everything seems to work fine, but I am also getting some process error (this was not the case with .30): 2023-11-02 21:57:51.663 [info] [Info - 9:57:51 PM] (22156) Pylance language server 2023.10.53 (pyright d7012d0d) starting 2023-11-02 21:57:56.650 [info] [Info - 9:57:56 PM] (22156) [BG(1)] Long operation: getSemanticTokens full at xxx.py (2834ms) |
That error doesn't matter. It's because we're killing a child process a lot sooner than we used to in 2023.10.30. We should just skip logging the error if it's not found. |
Environment data
Code Snippet
Note: this is just a sample notebook, however, in any python/ipython files opened with this VSCode, the results are the same
Repro Steps
Expected behavior
Pylance should not crash
Actual behavior
Pylance crash
Logs
The text was updated successfully, but these errors were encountered: