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 doesn't work anymore (when a ".py" file is present) #810

Closed
TFCx opened this issue Jan 6, 2021 · 3 comments
Closed

Pylance doesn't work anymore (when a ".py" file is present) #810

TFCx opened this issue Jan 6, 2021 · 3 comments
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@TFCx
Copy link

TFCx commented Jan 6, 2021

Environment data

  • Language Server version: 1.12.2

  • OS and version:
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.1 LTS
    Release: 20.04
    Codename: focal

  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.5 64bits

Expected behaviour

Pylance should analyse semantically the code. It works with 12.1.

image

Actual behaviour

Semantic analysis is not working and even token inspection doesn't return anything.

image

Logs

[Error - 2:25:28 PM] stubPath /home/jean-david/Work/Anatoscope/src/circle/articulator/typings is not a valid directory.
[Info  - 2:25:28 PM] Assuming Python version 3.8
[Info  - 2:25:28 PM] Assuming Python platform Linux
[Info  - 2:25:28 PM] Searching for source files
[Info  - 2:25:28 PM] Background analysis(1) root directory: /home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist
[Info  - 2:25:28 PM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setTrackedFiles
Error: Debug Failure. /home/jean-david/Work/Anatoscope/src/circle/articulator/legacy/Calibration/.py is not a source file
    at P._addToSourceFileListAndMap (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:2075:13)
    at P.addTrackedFile (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:245:14)
    at forEach (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:211:18)
    at Array.forEach (<anonymous>)
    at P.addTrackedFiles (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:210:19)
    at P.setTrackedFiles (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:195:14)
    at B.onMessage (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/backgroundAnalysisBase.ts:354:50)
    at B.onMessage (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/server.bundle.js:1:32759)
    at MessagePort.<anonymous> (/home/jean-david/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/backgroundAnalysisBase.ts:273:66)
    at MessagePort.emit (events.js:223:5)

Code Snippet / Additional information

Semantic analysis seems to crash when encountering a file name ".py". If this file is renammed "x.py", 12.2 seems to work as intented.

@github-actions github-actions bot added the triage label Jan 6, 2021
@erictraut
Copy link
Contributor

This will be fixed in the next release of pylance.

@erictraut erictraut added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Jan 6, 2021
@github-actions github-actions bot removed the triage label Jan 6, 2021
@jakebailey
Copy link
Member

This issue has been fixed in version 2021.1.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202110-6-january-2021

@Nicialy
Copy link

Nicialy commented Jul 26, 2022

Hello, why Pylance dont work in Kali Linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants