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

Pylance reports shebang as error #6175

Closed
ullix opened this issue Jul 23, 2024 · 3 comments
Closed

Pylance reports shebang as error #6175

ullix opened this issue Jul 23, 2024 · 3 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@ullix
Copy link

ullix commented Jul 23, 2024

Environment data

  • Pylance version: v2024.7.1
  • OS and version: Linux Mint 21.2,
    6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
  • Python version (& distribution if applicable, e.g. Anaconda): 3.12.4 (main, Jun 8 2024, 18:29:57) [GCC 11.4.0]

Code Snippet

any file beginning with:

#! /usr/bin/env python3

When pressing F8:
Selection_051

An internal error occurred while type checking file "/home/ullix/geigerlog/geigerlog/gdev_gemf.py": Error: Debug Failure. False expression.
    at t.computeMroLinearization (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:977192)
    at /home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:767820
    at t.invalidateTypeCacheIfCanceled (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:1093823)
    at Jn (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:761462)
    at ja (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:813625)
    at qa (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:818357)
    at Ca (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:796132)
    at /home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:794313
    at Array.forEach (<anonymous>)
    at ba (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:794284)
    at wa (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:800649)
    at a.timeOperation (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:1210851)
    at W.visitImportFrom (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:96376)
    at W.visit (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:403227)
    at W.visitNode (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:408545)
    at W.walk (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:408424)
    at W.walk (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:75202)
    at /home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:408509
    at Array.forEach (<anonymous>)
    at W.walkMultiple (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:408488)
    at W.walk (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:408454)
    at W.walk (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:75202)
    at W._walkStatementsAndReportUnreachable (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:116243)
    at W.check (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:74819)
    at /home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:530009
    at a.timeOperation (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:1210851)
    at /home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:529911
    at t.LogTracker.log (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:1172206)
    at _0x43ea54.check (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:529817)
    at /home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:455887
    at t.LogTracker.log (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:1172206)
    at F._checkTypes (/home/ullix/.vscode/extensions/ms-python.vscode-pylance-2024.7.1/dist/pyright.bundle.js:1:455344)Pylance

Repro Steps

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Jul 23, 2024
@KacieKK
Copy link
Contributor

KacieKK commented Jul 23, 2024

Thanks for reporting this issue. Although I cant reproduce it, this does look like a known bug in 2024.7.1 to me.
Screenshot 2024-07-23 143448
Could you try to use our most recent prerelease (2024.7.101) and see if it solves this issue?

@ullix
Copy link
Author

ullix commented Jul 24, 2024

Could you try to use our most recent prerelease (2024.7.101) and see if it solves this issue?

Maybe. But I need advice on how to do this. So far I only installed things when code offered them for install.

@ullix
Copy link
Author

ullix commented Jul 24, 2024

Ok, I found out (easy enough!).

Now with v2024.7.101 (pre-release) the problem is absent! Thank you.

@rchiodo rchiodo closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants