microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.3k stars 293 forks source link

Notebook cell gets stuck in 'Pending' state #13349

Closed dobos closed 11 months ago

dobos commented 1 year ago

Applies To

What happened?

When I start a notebook with 'Run all' and I have to kill the kernel for some reason with the kill command from the terminal the notebook cells that haven't been executed can get stuck in the 'Pending' state (little clock icon). Even if I close the notebook and reopen it, I cannot execute these pending cells anymore unless I convert them to a markdown cell and back. It would be great if the pending flag was reset when the kernel dies or otherwise killed without using the vscode 'Interrupt' and 'Restart' buttons. I have to restart vscode for the 'Pending' flags to go away. This is a vscode issue, the underlying kernel runs just fine.

No entry in the Jupyter log when I try to execute a cell marked as pending, so apparently vscode doesn't even attempt to execute that cell.

VS Code Version

Version: 1.77.3 (system setup) Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710 Date: 2023-04-12T09:16:02.548Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19045 Sandboxed: No

Jupyter Extension Version

v2023.3.1201040234

Jupyter logs

--

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Remote

DonJayamanne commented 1 year ago

@luabud @rchiodo /cc

CNwangbin commented 1 year ago

Now, I think Pylance maybe is the reason.

Please keep using Jupyter withoupyt Pylance for a while, until you feel confident that it has not reproduced at all for long enough.

Thanks again.

The problem caused by Pylance version. I installed Pylance with Version=10.40 resolved this bug. Thanks for all the discussed people. Thanks for you @alethere https://github.com/microsoft/vscode-jupyter/issues/13349#issuecomment-1789082604

DonJayamanne commented 11 months ago

The problem caused by Pylance version. I installed Pylance with Version=10.40 resolved this bug. Thanks for all the

Closing as fixed.

znelson32 commented 10 months ago

Confirmed downgrading to Pylance v10.40 resolves this

DonJayamanne commented 10 months ago

@luabud @heejaechang /cc

luabud commented 10 months ago

This is fixed in the latest version of Pylance (2023.12.1), so there shouldn't be any need to downgrade it anymore

cae0027 commented 10 months ago

me too... still i don't know why

Dec 31, 2023 and still having the same issue. Copied code in the cell, deleted the cell and pasted in a new cell and it works fine.

DonJayamanne commented 10 months ago

@cae0027 please can you create a new issue with versions of os and extensions installed and steps to repro the issue