skip to Main Content

I’m encountering an issue with the Pylance extension in VS Code when working on a Python notebook. Some time I add or delete a cell, the language server crashes with the following error:

Error: Debug Failure. False expression: Chained file path undefined doesn't match cellFilePaths [REDACTED PATH].ipynb:pylance-notebook-cell:W5sZmlsZQ==.py
    at _0x225e6a ([REDACTED PATH]server.bundle.js:1:1015920)
    at [REDACTED PATH]server.bundle.js:1:1023143
    at _0x32da0b.<computed> ([REDACTED PATH]server.bundle.js:1:1023175)
    at _0x382c6c._onDidChangeNotebookDocumentAsync ([REDACTED PATH]server.bundle.js:1:1001957)

Here’s my setup:

  • VS Code Version: June 2023 (version 1.80)
  • Pylance Extension Version: 2023.8.21
  • Operating System: Windows 10 and Linux

Steps to reproduce:

  • Open a Jupyter notebook in VS Code.
  • Add or delete a cell.
  • The Pylance language server crashes with the above error.

Has anyone encountered this issue before? Any guidance or solutions would be greatly appreciated.

Thank you in advance!

I’ve already tried several troubleshooting steps:

  • Reinstalled VS Code.
  • Reinstalled the Pylance extension.
  • Updated both VS Code and Pylance to their latest versions.

Despite these efforts, the issue persists.

My primary goal is to have Pylance running smoothly within Jupyter notebooks in VS Code. If anyone has encountered and resolved this problem, or has any suggestions, I’d be very appreciative.

2

Answers


  1. This seems to be an instance of this known issue: Pylance crashing on Jupyter Notebook Cell Deletion #4685. The issue is known to exist for v2023.8.10 of the Pylance extension. Apparently for many (but not all) users, the issue does not reproduce in Pylance v2023.7.40, so downgrading might be a possible workaround for now. See also VS Code – how to rollback extension/install specific extension version.

    You can also try using this setting "python.analysis.enableSyncServer": true to see if that makes any difference- it forces the extension to handle one LSP message at a time (you need to restart VS Code once for that setting to take effect). If you can determine a procedure to reliably reproduce the issue, it would be greatly useful to the maintainers of this extension in the resolution process.

    For your reference and learning purposes, I found the above issue ticket by googling "github vscode issues jupyter crash "Chained file path undefined doesn't match cellFilePaths"".

    Login or Signup to reply.
  2. It is a known issue I faced as well.
    I tried downgrading with version 2023.7.40 but Pylance still crashed when adding/deleting cells.

    Version v2023.7.30 solved the issue for me.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search