Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPython Notebook/Jupyter autosave failed

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.

like image 458
angisgrate Avatar asked Jul 24 '15 21:07

angisgrate


People also ask

How do I enable autosave in Jupyter Notebook?

You can use this Jupyter extension By default, a Jupyter Notebook saves your work every 2 minutes, and if you want to change this time interval you can do so by using the %autosave n magic command; where n is the number of seconds, and if n=0 this means no autosaving.

Does Jupyter Notebook have autosave?

Jupyter 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)

How do I save an IPython 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.


2 Answers

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).

like image 67
demalexx Avatar answered Sep 25 '22 02:09

demalexx


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

like image 40
Skillachie Avatar answered Sep 22 '22 02:09

Skillachie