pylance-release
pylance-release copied to clipboard
`inlineChat.viewInChat` command from notebook will cause pylance to crash
- open a notebook and press ctrl+i to open the copilot inline chat
- ask for a code change and then run
inlineChat.viewInChaton the response (ctrl+down) :bug: pylance crashes with bad request
2024-09-25 12:59:22.351 [error] Request textDocument/documentSymbol failed with message: Debug Failure. Notebook file should not be passed to getWorkspaceForFile: vscode-chat-code-block:/c%3A/src/test/ws1/1.ipynb?25fea62c-6c24-498f-993c-46a83def7b6f: Error: Request textDocument/documentSymbol failed with message: Debug Failure. Notebook file should not be passed to getWorkspaceForFile: vscode-chat-code-block:/c%3A/src/test/ws1/1.ipynb?25fea62c-6c24-498f-993c-46a83def7b6f
at ae (c:\Users\aaron\.vscode-insiders\extensions\ms-python.python-2024.15.2024092501-win32-arm64\out\client\extension.js:2:2052314)
at oe (c:\Users\aaron\.vscode-insiders\extensions\ms-python.python-2024.15.2024092501-win32-arm64\out\client\extension.js:2:2050274)
at Immediate.<anonymous> (c:\Users\aaron\.vscode-insiders\extensions\ms-python.python-2024.15.2024092501-win32-arm64\out\client\extension.js:2:2046568)
at processImmediate (node:internal/timers:483:21)
Thanks for reporting, I am able to repro this.
Moving to triage, I think we might want to fix this before we ship?
Not sure how many people are using it, this issue only repros when user clicks View in Chat in a notebook file. But I agree it's something we should fix sooner rather than later.
THe notebook in the chat window is messed up too for me. Maybe the chat window is passing the wrong file? Shouldn't it be passing us the cell and not the file?
Maybe the scheme is not supported? Running the same command in a regular python file doesn't crash Pylance but gives me a silent error. [Error - 10:54:20 AM] (25168) File or directory "vscode-chat-code-block:/" does not exist.
let me take a look. it looks like it is one of reason why pylance user do reload according to telemetry and vscode-chat-code-block is something I worked with before for copilot workspace changes.
It seems that I am unable to use pylance now in my python project which contains notebooks. Is there a version I could roll back to, or a way to exclude notebooks from the pylance analysis?
This issue has been fixed in prerelease version 2024.11.101, which we've just released. You can find the changelog here: CHANGELOG.md