PaulH
PaulH

Reputation: 327

Unable to save Jupyter Notebook in VSC

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

Upvotes: 4

Views: 17129

Answers (6)

jmn20
jmn20

Reputation: 31

I solved this by adding the .ipynb to my filename and selecting 'No Extension' for Save as type which is found on the very bottom of the dropdown for Save as type.

Upvotes: 3

Alex8695
Alex8695

Reputation: 1

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

Upvotes: -1

Kable
Kable

Reputation: 1

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

But clicking the save icon save notebook worked.

Upvotes: 0

user3098840
user3098840

Reputation: 23

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.

Upvotes: 1

Jill Cheng
Jill Cheng

Reputation: 10344

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.

Upvotes: 0

nickh3
nickh3

Reputation: 35

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.

Upvotes: 0

Related Questions