2
votes

I've made changes to .ipynb-file in Visual Studio Code, but I'm unable to save it. I've tried 4 ways and each of them doesn't work:

  1. Ctrl + S (nothing happens)
  2. Via File > Save (is permanent greyed out)
  3. Via File > Save As... (nothing happends, no pop-up of the window explorer)
  4. Pressing the save-button in the notebook (nothing happens)

As you can see in the screenshot below, marked with the star, there are changes to save. What do I do wrong or how to solve this issue?

Printscreen for saving Jupyter Notebook

5
Is there any error message displayed in the terminal and prompt box? - Jill Cheng
I have this problem too. One time I lost all content from my notebook. It took time to recover the code. This topic was helpful to me. - Timur

5 Answers

1
votes

This is an known issue, and is being tracked in this bug report: https://github.com/microsoft/vscode-python/issues/12562.

I would encourage you to add a description of your setup (plus any output from the developer tools console) to the issue above, so that the developers can reproduce the bug and fix it.

0
votes

You can convert to a .py file.

Click icon marked below to Convert and save to python script.

enter image description here

Now that you have a backup, nothing will be lost.

Also following that, I found that closing the .ipynb file then prompted me to save it.

It's a workaround not a full solution, but I hope it helps.

0
votes

Did you try to restart vscode?

I tried "Ctrl + S" is OK,the premise is that the mouse focuses on it; And the save button is also OK.(python:3.8.3; vscode:1.47.0)

In addition, you could try to turn on the auto save function of vscode,then create a file with the suffix .ipynb directly under your project.

0
votes

Same thing happened to me today, Save and Save AS were not greyed out.

But clicking the save icon save notebook worked.

-1
votes

As none of the solutions here worked for me, and this is the 1st posting to come up searching google, figure I'd post the fix that worked for me.

By reloading the editor, it appears to force some change in VS Code.

Initially when I save, the save dialog is already pointing to the path of my open folder.

After reloading the editor, the save dialog loads from my desktop.

Additionally when I reload there is the header 'This Editor Is Depreciated'

As long as I reload, make sure the header is there, I'm good.

Screen shots:

1. Right Click The Open Tab, Click Reopen Editor With...

2. Select Jupiter Notebook Editor

3. Everything Works Once Header Is Displayed