50

I am working in iPython 3/Jupyter running multiple kernels and servers. As such, i often forget to personally save things as I jump around a lot. The autosave has failed for the past 3 hours. The error says: "Last Checkpoint: 3 hours ago Autosave Failed! I try to manually File>>Save and Checkpoint, and nothing changes. Help! Next to my Python 2 kernel name, there is a yellow box that say forbidden instead of edit. It goes away when i click on it. I don't know if that has anything to do with the failure to save, but it doesn't change once clicked.

angisgrate
  • 497
  • 1
  • 4
  • 5
  • 5
    Did you ever figure out what was happening? I am having the same issue now. – kgully Sep 04 '15 at 20:11
  • its the same 2-user issue that skillachie described below. they intend it to retain privacy i believe even though i am the one accessing it both times – angisgrate Oct 28 '15 at 17:07
  • I was experiencing this issue too. I was executing a long-running process. When I interrupted the kernel, I was able to save/autosave once again. – notconfusing Jun 17 '18 at 02:04

20 Answers20

60

I had same problem and I found out I was logged out from Jupyter. I found that when I went to Jupyter home page and it asked me to enter password. After I entered password I could save my notebook (it was still running in other tab).

demalexx
  • 4,661
  • 1
  • 30
  • 34
  • 3
    Thank you! I just had to refresh my Jupyter home page, tell Chrome that the site was safe, and then it allowed me to save again. – spacetyper May 17 '16 at 16:40
  • 1
    The good thing is that you can leave the running notebook tab opened and re-login in the home page tab, so that you don't lose any unsaved change. – PlasmaBinturong Nov 20 '19 at 14:38
14

The problem is that the notebook was started with with two different users. The most common scenario is the following:

  1. Starts with elevated user/root sudo ipython notebook
  2. Do some work and then start with ipython notebook

From #1 a hidden directory was created called .ipynb_checkpoints with root privileges. As a result you will not be able to save updates unless the notebook is running as root.

To fix this simply delete the .ipynb_checkpoints directory

Skillachie
  • 3,176
  • 1
  • 25
  • 26
  • deleting the .ipynb_checkpoints directory worked for me. In the windows, it is at C:\users\user name\ – Regi Mathew Apr 05 '18 at 11:40
  • Thanks! Your answer helped me! I opened a command prompt for jupyter notebook and another putty for spark. Once I closed everything and just opened spark jupyter with putty, it worked fine! – Dev Feb 21 '21 at 17:37
6

I had the same problem while running iPython3/Jupyter local with multiple notebooks open. I solved the problem by:

  1. 1 Refreshing the dashboard tab (localhost:8888/tree#).
  2. Running 'jupyter notebook list' in the terminal.
  3. Copying the token from the terminal into the password box on refreshed dashboard.
Bryan Prazen
  • 323
  • 3
  • 7
5

Open a new tab by clicking on the Jupyter logo on the top left of your open notebook. When asked for a token, from a terminal run:

jupyter notebook list

The output will look something like this:

http://localhost:8888/?token=THE_TOKEN_YOU_NEED :: /Users/.../.../.../

Copy THE_TOKEN_YOU_NEED in the jupyter main tab, and your notebook will become active again (i.e., you can save it, open a new one, etc.)

Use Me
  • 449
  • 5
  • 4
5

For me, it happens when all the cell's output is too long. Just clear some output to solve this.

allenyllee
  • 964
  • 1
  • 13
  • 16
2

i faced this same issue severely :( ,, and finally i found it alone ))) /// and its all abt RANSOMEWARE PROTECTION on my windows 10 pro.. it wont let u over write any files and folder by third party apps under this protection.

    • Open the Windows Security app by clicking the shield icon in the task bar or searching the start menu for Defender.
    • Click the Virus & threat protection tile (or the shield icon on the left menu bar) and then click Ransomware protection.
    • Set the switch for Controlled folder access to "OFF"

and happy jupyter)))

Bharath Kumar
  • 893
  • 9
  • 8
1

I know this question is very old but I have encountered the same issue recently and got a simpler workaround. Note that in my case, I don't know what caused the issue, but certainly not a multiple users since the notebook is run internally on an offline computer (no outside access whatsoever).

In order to resume the autosaves, I just had to re-open the notebook in another tab and manually copy paste all the unsaved cells. Burdensome but it fixed the problem. (Also note that I was able to keep working on the notebook, as long as I didn't want to save or restart the kernel)

ysearka
  • 3,805
  • 5
  • 20
  • 41
1

I had a separate problem.

Looking in my jupyter notebook console window, I saw the message: [I 09:36:14.717 NotebookApp] Malformed HTTP message from ::1: Content-Length too long

It made me think maybe there was some huge amount of text in one of my cells' outputs or something, so I started clearing the outputs.

When I cleared one cell with a plotly chart, it worked again. Maybe there was some problem with Plotly.

BirdLaw
  • 572
  • 6
  • 16
1

I had the same issue,i tried these methods unfortunately it doesn't work. At last i found a method

  1. Copy your filename.ipynb file manully to same directory

  2. Rename it with filename at about 5 characters. Then open it in jupyter notebook , and it can be saved successfully .

  3. After that you can rename it to any name you want !

Thusitha Deepal
  • 1,392
  • 12
  • 19
1

For me the issue turned out to be the file path was too long. Renaming the folder resolved the issue.

justin4480
  • 1,361
  • 1
  • 9
  • 5
1

I've had similar issues a number of times.

It's good to be careful as you don't want to lose any of your unsaved work.

The following worked for me (and didn't lose any of my work):

1) Open a new tab in the browser I'm using
2) Close the Jupyter terminal
3) Start a new Jupyter / Anaconda session, which 
should automatically bring up the login page in the 
current new tab
4) Login
5) Navigate back to the window with your 
notebook and save.
DonCarleone
  • 544
  • 11
  • 20
0

I had a similar problem which was caused by the multiple users issue others have mentioned. I was using a combination of Docker with a volume, Linux subsystem running jupyter and plain old windows on the same directory. Unfortunately I had an issue with the size of the data I was loading so had to ditch docker which is where I started to run into problems.

To fix this, using gitbash, I ran:

rm -rf <location of your dir where you launch notebook>/.ipynb_checkpoints/
rm -rf ~/.jupyter/

then I made sure this was recreated by running:

jupyter notebook password

which recreates the .jupyter folder. Then relaunching the notebook fixed this problem for me.

robmsmt
  • 1,389
  • 11
  • 19
0

I just had this problem. All I did was quit/logout of my multiple notebooks. Then closed the anaconda dashboard. Then relaunched everything. The only thing you gotta worry about is losing the work you have already done. For that I copied my code into notepad and just copied it right back.

0

For me, the key is that I hide my ".ipynb_checkpoints".Just make the folder visible.

0

Had the same problem. What worked for me was removing "COALESCE" statement from one of the SQL queries that were part of notebook. Super weird stuff, now idea how it makes sense.

PtrZlnk
  • 131
  • 6
0

I also had an issue, where I couldn't even press control s or File>Save to save, but also it wasn't autosaving. The reason I found out was that my server required root privileges to make edits to the files, so jupyter could not save them. Rerun jupyter notebook as root to fix the issue. See https://stackoverflow.com/a/65225757/13655355 to run jupyter notebook as root.

Kevin Yao
  • 59
  • 4
  • 1
    Please explain why you downvoted. I can try to make my answer better, but just downvoting is not helpful. – Kevin Yao Dec 15 '20 at 04:20
0

In the notebook server page (the page where you launch notebooks from), I clicked on the Jupyter icon, and the Forbidden icon disappeared and I could save my work again.

I found this solution in the following git issue thread:
https://github.com/microsoft/AzureNotebooks/issues/417

eric
  • 7,142
  • 12
  • 72
  • 138
0

I had a jupyter notebook server with multiple open notebooks and only one specific notebook displayed the out of memory error. The other could be saved just fine.

I could trace the error down to a large altair plot where I've used alt.data_transformers.disable_max_rows(). I remove the according plot by commenting out the cell and rexecuted it. After that I was able so save the notebook.

Relevant Source:

v.tralala
  • 1,444
  • 3
  • 18
  • 39
0

I solved it by closing many tabs and clearing the cache of my firefox browser.

Tried the suggestions from the other answers and none of them worked. So I checked my activity monitor and realized that I was using all the memory space plus swap space. So I cleared the browser cache and closed down most of my other jupyter notebook tabs. It solved the problem! Maybe with too many notebooks with lots of high-resolution images open, it created something weird.

Code42
  • 2,292
  • 1
  • 17
  • 22
0

I had the same issue in which I was not able to save my file using the autosave function in Jupyter using the (Ctrl+s) combination. I tried refreshing and restarting Jupyter home page. Once I did that It asked me for my username and the password. After I completed it,I was able to see all of my work and the autosaved as well worked.

Hope it helps!