Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode is not saving changes in Jupyter Notebook (unless I run the cells with changes)

I've been losing changes I've made to some of my cells because although I saved the notebook file, I didn't actually run the cell (this is for both code and markdown cells). And when I close the file down there is no warning of the sort "do you want to save changes?".

I know the workaround is to just run cells before saving. But it's just not a robust working setup.

Anyone got solutions? I would even switch editor to something with a similar feel if there's an alternative.

like image 278
Alexander Soare Avatar asked Feb 11 '20 09:02

Alexander Soare


People also ask

How do you save changes in Jupyter Notebook?

Saving your edits is simple. There is a disk icon in the upper left of the Jupyter tool bar. Click the save icon and your notebook edits are saved.

How do you save a Jupyter Notebook VS Code?

You can save your Jupyter Notebook using the keyboard shortcut Ctrl+S or File > Save.

Does Jupyter Notebook automatically save?

Saving a NotebookJupyter Notebooks autosave, so you don't have to worry about losing code too much. At the top of the page you can usually see the current save status: Last Checkpoint: 2 minutes ago (unsaved changes)


1 Answers

Had the same problem, checkout the github response (link)

In USER settings (~/Library/Application Support/Code/User/settings.json) include:

"jupyter.experiments.optInto": [
    "CustomEditor"
]

Helped for me.

like image 196
Don Pasqual Avatar answered Oct 29 '22 03:10

Don Pasqual