-
Notifications
You must be signed in to change notification settings - Fork 768
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
An internal error occurred while type checking file / Error performing analysis: RangeError: Maximum call stack size exceeded #2373
Comments
Thanks for reporting the problem. Unfortunately, I don't have enough context to diagnose the problem from the logs above. We've seen similar stack traces in our crash data, but I haven't had enough context to repro the problem or determine the root cause. There is something about the structure of this code that is triggering the bug. I'm very interested in figuring this one out! You mentioned that the problem occurs when you applied the decorator By any chance, are you able to narrow down the problem to a self-contained repro that you could post? Any additional clues would be very much appreciated! |
I'm trying to narrow it down and find the source of the problem. I've got rid of the mentioned decorator and still see the problem. It's quite peculiar, as this step has previously helped me to resolve this. I have a specific py file in the project where the error always occurs whenever I simply open the file.
Are there any specific steps you can suggest that I can follow to help narrow it down? |
Thanks for the additional logs. I don't see anything that's suspicious. The technique I typically use to narrow down reproducible problems like this is to temporarily comment out code until the problem goes away. If it's a large file, I binary search it (comment out half the code, etc.) to speed up the search. This usually narrows it down pretty quickly to a single function or block. |
I narrow it down to this part: When I add or remove message_start variable, I get the error.
logfile:
Are there any other steps that can help you? |
Thanks! I'm able to repro the problem locally. I'll investigate further. |
I'm getting more or less the same error too, specifically, importing PySimpleGUI that is a pretty big library
@erictraut tag me if you need any kinda of log or report (w/ instruction to generate them), or if I should file a new issue |
Thanks @georgeivanyan and @DeusAres for the repros. Very helpful. I was able to find the root cause of the problem. It will be fixed in the next release. |
This issue has been fixed in version 2022.2.3, which we've just released. You can find the changelog here: CHANGELOG.md |
Environment data
Expected behaviour
Can typecheck my file (unable to show it here, not open source) when using wrap method from the class
Actual behaviour
Can't typecheck file. Pylance gets an error: (1140) An internal error occurred while type checking file / (1140) Error performing analysis: RangeError: Maximum call stack size exceeded
Logs
20-Python Language Server.log
exthost.log:
Code Snippet / Additional information
I started to experience this when I use decorator and wrap method is in a class.
For example, this works:
But bug happens when I try to use it with the class:
But currently I have the same problem even if I don't use it.
The text was updated successfully, but these errors were encountered: