microsoft / vscode-jupyter

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

Jupyter Notebook randomly prompts save file #13029

Open aztecbinaynay opened 1 year ago

aztecbinaynay commented 1 year ago

Applies To

What happened?

So it usually happens when I am trying to execute an cell in notebook. Out of nowhere VS code prompts me to save the file (even with autosave on) and then it resets my connection to the kernel. Trying to save the file shows an error "Failed to save '': Unexpected type. Pressing retry does not help. Pressing discard causes the error Unexpected type to pop up. The file cannot be closed by using ctrl+f4 or simply right clicking on it and closing it. Pressing save leads nowhere and prompts the errors I just wrote. Pressing don't save does nothing, too. The file just stays open. Can't open any extensions. The error Cannot read properties of undefined (reading 'row') appears when clicked on any extension.

VS Code Version

Version: 1.76.0 (user setup) Commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb Date: 2023-03-01T10:22:44.506Z 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

2023.3.1000690354

Jupyter logs

Visual Studio Code (1.76.0, undefined, desktop)
Jupyter Extension Version: 2023.2.1000381022.
Python Extension Version: 2023.3.10341119.
Multiple Workspace folders opened c:\Users\core i5\Documents\GitHub\ZTMDeepLearningTF, c:\Users\core i5\Documents\GitHub\DataScience
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 04:53:34.248: LSP Notebooks experiment is enabled
info 04:55:30.703: Process Execution: > ~\Documents\GitHub\DataScience\pyenv\pyvenv3104\Scripts\python.exe -m pip list
> ~\Documents\GitHub\DataScience\pyenv\pyvenv3104\Scripts\python.exe -m pip list
warn 04:55:40.724: No interpreter with path c:\Users\core i5\Desktop\GitHub\DataScience\pyenv\Scripts\python.exe found in Python API, will convert Uri path to string as Id file:///c%3A/Users/core%20i5/Desktop/GitHub/DataScience/pyenv/Scripts/python.exe
warn 04:56:26.172: No interpreter with path c:\Users\core i5\Desktop\GitHub\DataScience\pyenv\Scripts\python.exe found in Python API, will convert Uri path to string as Id file:///c%3A/Users/core%20i5/Desktop/GitHub/DataScience/pyenv/Scripts/python.exe
warn 04:56:26.174: No interpreter with path c:\Users\core i5\Desktop\GitHub\DataScience\pyenv\Scripts\python.exe found in Python API, will convert Uri path to string as Id file:///c%3A/Users/core%20i5/Desktop/GitHub/DataScience/pyenv/Scripts/python.exe
warn 04:56:26.175: No interpreter with path c:\Users\core i5\Desktop\GitHub\DataScience\pyenv\Scripts\python.exe found in Python API, will convert Uri path to string as Id file:///c%3A/Users/core%20i5/Desktop/GitHub/DataScience/pyenv/Scripts/python.exe

Coding Language and Runtime Version

python 3.10.4

Language Extension Version (if applicable)

Python 2023.5.10661006

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

Additional Observation:

This also happens when trying to turn notebook cell into markdown using (Esc m)

JohnGoertz commented 1 year ago

This happened to me too, starting in the last week or two.

aztecbinaynay commented 1 year ago

This happened to me too, starting in the last week or two.

Nice! I thought it was just me. They should fix this issue ASAP because it's making my workflow so much more difficult. I've had to use Colab since the bug happened.

kenissur commented 1 year ago

This is happening to me and I've lost work because of this multiple times. It happened only over SSH for me.

JohnGoertz commented 1 year ago

Possibly also related to SSH for me, I do all my work via WSL2 (Ubuntu).

kaykanloo commented 1 year ago

Unlikely to be related to SSH. I'm consistently having the same issue on macOS (without using SSH), usually after a few minutes of opening a notebook.

It has made it almost impossible for me to use vscode. After the error message appears, everything becomes unresponsive and I can't even close the notebook.

Oddly enough I've found a workaround for now after I got so frustrated that tried to manually run a jupyter server and selected the Existing Jupyter Server instead of letting vscode manage the kernels. No issues so far. But if I switch back to letting vscode start the jupyter server based on the very same conda environment, the bug reappears.

VS Code Version

Version: 1.76.2
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:53:46.528Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.3.0
Sandboxed: No

Jupyter Extension Version v2023.2.1200692131

aztecbinaynay commented 1 year ago

This doesn't happen to me anymore. Anyone else?

kaykanloo commented 1 year ago

Might be too soon to confirm this, but so far it seems like the latest update has fixed it for me too.

msalgadob commented 1 year ago

It started to happen in my system. VSCode is unusable with jupyter notebook.