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

An internal error occurred while type checking file filename.py: RangeError: Maximum call stack size exceeded (Request textDocument/semanticTokens/full failed) #701

Closed
ehossack opened this issue Dec 8, 2020 · 3 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@ehossack
Copy link

ehossack commented Dec 8, 2020

Environment data

Local System: macOS 10.15.6
No remote
Pylance as part of vscode python language tools (v2020.11.371526539):

Version: 1.51.1
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-11T01:11:34.018Z (3 wks ago)
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 19.6.0

Python 3.9.0 as part of poetry (1.1.4) in a virtualenv installed via pyenv.
No adjustments to pylance.

Expected behaviour

Can typecheck my file (unable to show it here, not open source)

Actual behaviour

Can't typecheck file

Logs

[Error - 6:04:27 PM] An internal error occurred while type checking file "/Users/ehossack/code/<project>/<path/to/folder>/<file>.py": RangeError: Maximum call stack size exceeded
    at Object.b [as lookUpClassMember] (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:454089)
    at Be (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:296050)
    at ue (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:275120)
    at /Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:297159
    at Be (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:297619)
    at pe (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:275028)
    at /Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:322073
    at /Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:451636
    at Array.forEach (<anonymous>)
    at Object.c [as mapSubtypes] (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:451513)
[Error - 6:04:27 PM] Error performing analysis: RangeError: Maximum call stack size exceeded
    at Object.b [as lookUpClassMember] (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:454089)
    at Be (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:296050)
    at ue (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:275120)
    at /Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:297159
    at Be (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:297619)
    at pe (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:275028)
    at /Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:322073
    at /Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:451636
    at Array.forEach (<anonymous>)
    at Object.c [as mapSubtypes] (/Users/ehossack/.vscode/extensions/ms-python.vscode-pylance-2020.12.0/dist/pyright.bundle.js:1:451513)
[Error - 6:04:27 PM] Request textDocument/semanticTokens/full failed.
  Message: Request textDocument/semanticTokens/full failed unexpectedly without providing any details.
  Code: -32603 

See also #475 (comment)

@github-actions github-actions bot added the triage label Dec 8, 2020
@jakebailey jakebailey added the bug Something isn't working label Dec 8, 2020
@github-actions github-actions bot removed the triage label Dec 8, 2020
@jakebailey jakebailey added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Dec 9, 2020
@jakebailey
Copy link
Member

This issue has been fixed in version 2020.12.1, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#2020121-9-december-2020

@sergei3000
Copy link

@jakebailey
I'm still having this issue with version 2020.12.1.
In both files I'm working on now along with having the error message I'm having code coloring and code suggestions disappearing right after the part in code where I define a pyspark's UDF (user defined function) using a decorator. Meaning something of this kind:

@F.udf(returnType=T.StringType())
def some_func(arg: int) -> str:
    if arg > 6:
        return "my_str"

Where F comes from from pyspark.sql import functions as F.

Here's the error message:

An internal error occurred while type checking file "/home/local/X5/serzakharov/projects/x5id/sz_x5_id/0025_loyalty_funnel/rfm.py": RangeError: Maximum call stack size exceeded
    at Object.isSameGenericClass (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/types.ts:567:21)
    at verifyTypeArgumentsAssignable (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:15213:26)
    at canAssignClassWithTypeArgs (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:15140:18)
    at canAssignClass (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:14998:24)
    at canAssignType (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:15961:22)
    at assignTypeToTypeVar (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:15521:18)
    at canAssignType (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:15634:24)
    at partiallySpecializeFunctionForBoundClassOrObject (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:17268:25)
    at bindFunctionToClassOrObject (/home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:17139:24)
    at /home/local/X5/serzakharov/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.1/dist/pyright-internal/src/analyzer/typeEvaluator.ts:4176:28Pylance

@sergei3000
Copy link

I submitted a new issue for this - see #720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants