pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Pylance 2022.08.10 crashes with Jupytext

Open tratigan-drw opened this issue 1 year ago • 7 comments

Environment data

  • Language Server version: 2022.08.10
  • OS and version: Ubuntu 20.04 LTS
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.5 miniconda environment

Code Snippet

This can be replicated on an empty Python file

Repro Steps

  1. Install jupytext for notebooks
  2. Create an empty python file foo.py
  3. Click "Open as a Jupyter Notebook"

Expected behavior

Pylance does not crash (Pylance does not crash on any version before 2022.08.10)

Actual behavior

Pylance crashes

Logs

Error: Debug Failure. verifyCellChainIsLinear should only be called on notebooks
    at _0x3244cf (/home/tratigan/.vscode/extensions/ms-python.vscode-pylance-2022.8.10/dist/server.bundle.js:1:396859)
    at _0x270681._onDidOpenNotebookDocument (/home/tratigan/.vscode/extensions/ms-python.vscode-pylance-2022.8.10/dist/server.bundle.js:1:369871)
[Error - 12:00:07 PM] The Pylance server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Full logs: pylance_logs.txt

tratigan-drw avatar Aug 04 '22 17:08 tratigan-drw

I tried but I got this

image

and I am not sure where the log is?

the failure is not on pylance, it looks like extension itself failed. is this extension require specific version of vscode or juypter extension?

heejaechang avatar Aug 06 '22 08:08 heejaechang

I'm dealing with the same error, but I haven't installed jupytext. Whenever I open a jupyter notebook, pylance server crashes.

hfmamh avatar Aug 07 '22 05:08 hfmamh

Suffering with the same error :(

hwancheol-jeong avatar Aug 07 '22 13:08 hwancheol-jeong

I too. As soon as I open a jupyter notebook, the pylance server crashes. None of the suggestions in this previously resolved issue helped me.

vsethi13 avatar Aug 08 '22 05:08 vsethi13

there is a bug with untitled.ipynb. we will releasing a fix in pylance prerelease soon.

heejaechang avatar Aug 08 '22 17:08 heejaechang

related to https://github.com/microsoft/pylance-release/issues/3126

heejaechang avatar Aug 08 '22 17:08 heejaechang

Switching to v2022.08.12 fixes this! Thanks @heejaechang :)

vsethi13 avatar Aug 09 '22 06:08 vsethi13