You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Language server should either support unsaved files (not sure how feasible that is) or not attempt to parse them. Perhaps a notification could indicate this?
Actual behaviour
Language server crashes when specifying the language of an unsaved file as Python.
Logs
(node:2548735) UnhandledPromiseRejectionWarning: Error: Debug Failure. Untitled-1 is not a source file
at P._addToSourceFileListAndMap (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:2075:13)
at P.setFileOpened (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:275:18)
at O.setFileOpened (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/backgroundAnalysisProgram.ts:90:23)
at d.setFileOpened (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/service.ts:192:41)
at Y.<anonymous> (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/languageServerBase.ts:789:39)
at Generator.next (<anonymous>)
at o (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright.bundle.js:1:584031)
(node:2548735) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Error: Debug Failure. Untitled-1 is not a source file
at P._addToSourceFileListAndMap (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:2075:13)
at P.setFileOpened (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/analyzer/program.ts:275:18)
at B.onMessage (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/backgroundAnalysisBase.ts:366:30)
at B.onMessage (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/server.bundle.js:1:32759)
at MessagePort.<anonymous> (/home/mike/.vscode/extensions/ms-python.vscode-pylance-2020.12.2/dist/pyright-internal/src/backgroundAnalysisBase.ts:273:66)
at MessagePort.emit (events.js:223:5)
at MessagePort.onmessage (internal/worker/io.js:70:8)
Background analysis message: setFileOpened
I enabled trace logging, but no additional messages were produced.
The text was updated successfully, but these errors were encountered:
I'm able to repro this with Pylance but not with the Pyright VS Code extension. I suspect it has to do with the interaction between the core Python extension and Pylance.
Environment data
Expected behaviour
Language server should either support unsaved files (not sure how feasible that is) or not attempt to parse them. Perhaps a notification could indicate this?
Actual behaviour
Language server crashes when specifying the language of an unsaved file as Python.
Logs
I enabled trace logging, but no additional messages were produced.
The text was updated successfully, but these errors were encountered: