jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.64k stars 4.9k forks source link

Saving issues: "Autosaved failed" and "Load failed, save is disabled" #1738

Closed AndreiCostinescu closed 2 years ago

AndreiCostinescu commented 8 years ago

jupytererrorgithub

The first time I open an unedited notebook (from the internet downloaded .ipynb file) it works saving and creates checkpoints. But after I close the notebook (CTRL+W in Chrome, not "Close and Halt") and try to reopen and edit the file, I can't save it anymore and the messages in the attached image appear. I also tried restarting the ipython/jupyter notebook and my laptop but the issue still persisted. I cannot save an existing (downloaded) notebook anymore after I saved a file and closed it.

The same problem appears when I create a new notebook and try to save it. This time however I cannot save it at all. It says from the start when I press CTRL+S that "Autosave failed" and "Load failed, save is disabled".

Does anybody know how to fix this? Any help is appreciated!

Thanks in advance,

Andrei

minrk commented 8 years ago

Do you see any information in the javascript error console? The "Load failed" suggests there might be a validity problem in the notebook. Save is disabled in this case because it failed to load the full notebook, so if you saved at that point it would write less than all of the notebook, losing data. There may also be an informative message in the log output in the terminal where you started the notebook server.

AndreiCostinescu commented 8 years ago

There were no error or other messages in the console and I also have this problem when I create a new (blank) notebook (as described above). I have found a workaround so that I can keep working but it requires to overwrite the file with the downloaded one and use the checkpoints (from the saves from the "first time editing"-mode) to continue working but it is complicated and obviously not the intended way to use the program :)

i-aztec commented 7 years ago

I faced with the same issues trying to save notebook.

There was an error in Chrome JavaScript Console: main.min.js:87 Uncaught (in promise) Error: Syntax error, unrecognized expression: #new-notebook-submenu-python3_(keras)

I found the same error message here and think that the issues arose because of non alphanumeric characters (bracket signs) in the kernel name.

AndreiCostinescu commented 7 years ago

Update: Apparently, this error occurs only when I have notebooks running in an environment. If I start the notebook without any (conda) environments on, I can create a new notebook and save it without any problems. However, if I try to create a new notebook using a different environment (Python [python3.5] as shown in the picture), I cannot save it, leading to the error messages described in my original post above. condaenvironmentscrop

takluyver commented 7 years ago

That's odd, I don't know why that would affect it. Are there any errors in the terminal where you launched the notebook?

AndreiCostinescu commented 7 years ago

Nope, no errors... The exactly same behavior as described in the original post in September occurs now, only that I played around more with the notebook and found this interesting thing (that saving works only from the root..) At least I can work from the root now, although it would also be nice to be able to work from environments..

ghost commented 7 years ago

I am having similar issues, just signed up today and no luck on getting a notebook working....

paulmattheww commented 6 years ago

I am having the same issue. To avoid loss of the files I am downloading as .py every now and again, but it is not clear that the actual .ipynb is updating. Everytime it happens I get the error in the console:

[W 14:55:14.083 NotebookApp] Unexpected error while saving file: ARTHUR Accuracy Report.ipynb [Errno 16] Resource busy: '/Volumes/individualfiles/Projects/Arthur/.~ARTHUR Accuracy Report.ipynb'
[E 14:55:14.083 NotebookApp] {
      "Host": "localhost:8889",
      "Connection": "keep-alive",
      "Content-Length": "669485",
      "Accept": "application/json, text/javascript, */*; q=0.01",
      "Origin": "http://localhost:8889",
      "X-Requested-With": "XMLHttpRequest",
      "X-Xsrftoken": "2|e040eb94|9d79015c603b1dc668c31a6e4c453ce7|1532711942",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36",
      "Content-Type": "application/json",
      "Referer": "http://localhost:8889/notebooks/ARTHUR%20Accuracy%20Report.ipynb",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-US,en;q=0.9",
      "Cookie": "_xsrf=2|e040eb94|9d79015c603b1dc668c31a6e4c453ce7|1532711942; username-localhost-8890=\"2|1:0|10:1533224971|23:username-localhost-8890|44:Y2NkMDZiOWMwNTcyNDZmNWIyN2NmYzJiNDQ2OTZjZmU=|56838100eef235489d99180523c045a5087308f72dc42cf14421416b035f2d8b\"; username-localhost-8889=\"2|1:0|10:1533572055|23:username-localhost-8889|44:Y2RjMjRkYmY3OGRhNDE5OTgyOTcxZGU0YjQzZDJkYTM=|5a5f0eb259d4ce8b54524b56506c5308178796a0ae99a7dfc2940c821c1a8c68\"; session=eyJjc3JmX3Rva2VuIjoiYmRkNGY4MGM4NmRjODAzZTFiNjYwMTdjZmVjOTg3OTUwMzkyZGMwOCJ9.DkyOwg.hSFakGmIIbTFGhdTQyJo3XcICMc; username-localhost-8888=\"2|1:0|10:1533747482|23:username-localhost-8888|44:OTU2MWU4ZDYwMzc2NDRiYWEyMjcwMGI1N2JjODI1MTI=|c65e84429c5a611bc3ed6cf716433064d2e1c5d8303111a1787029ce29b27139\""

and, after a few seconds three options appear at the top of the notebook: "Reload", "Restart" or "Overwrite". So far no data loss, but it's a bit worrisome since I'm doing some non-trivial work in these notebooks that are effected.

Thanks for all you all do. -Paul W.

paulmattheww commented 6 years ago

...ANNNND just lost data. Ugh.

For what it's worth conda update conda may have helped because I haven't gotten the errors I was getting before since it crashed. Just lost a half day's work though because the checkpoints didn't work.

ThusithaDeepal commented 5 years ago

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 !

Aditya0103 commented 5 years ago

I think I have figured out a solution in my case to this problem. My jupyter notebook had the same issue because there were too many output images that were getting loaded in while the notebook was loading. So , the solution in my case was to go to the C:\Desktop\Users\user_name and clear any unnecessary files stored in there , this should enable the disabled saving ability of the notebook. Also it will speed up the processing ! All the best

diaorch commented 5 years ago

Given that there was no error message for the case in the original post, I think this won't work for you. But I figure it might be useful for other people.

I also used a conda environment. In my case, after I tried saving the notebook, the console in which I started the notebook actually had the error message:

[IPKernelApp] ERROR | No such comm target registered: ipython.widget

So I simply followed the instruction on Installation — Jupyter Widgets 7.4.2 documentation - ipywidgets:

conda install -c conda-forge ipywidgets

And restart the notebook. I had to restart the notebook for the saving function to work again. So if you have the same problem, remember to backup your progress before restarting the notebook.

SarnathK commented 5 years ago

Update: Apparently, this error occurs only when I have notebooks running in an environment. If I start the notebook without any (conda) environments on, I can create a new notebook and save it without any problems. However, if I try to create a new notebook using a different environment (Python [python3.5] as shown in the picture), I cannot save it, leading to the error messages described in my original post above. condaenvironmentscrop

Yes, this happened to be true. I had changed my bash environment to start with a Python envmt (conda init bash -- does this) and if I launch notebooks after that, I was unable to save and checkpoint. I un-commented the lines added by Conda in .bashrc and then create a new shell session and the problem was gone.

Thanks for sharing this piece of info.

MNoel1117 commented 4 years ago

Here is what seems to fix the issue for me.

On installing packages from within the notebook,

Use only !pip install <pkg-name>

Avoid using !conda install <options> <phg-name>

I run my Jupyter Notebook, mltooling/ml-workspace, in a docker container on Windows 10. I never experienced issues like ‘failure to save’, ‘Autosave failed’, or 'Internal Server Error' until after I installed a package from within the Notebook using !conda install. Apparently, installing packages in this manner screws with the Jupyter Notebook environment. I rebuilt my Jupyter Notebook container and reinstalled my desired packages using !pip install and things are working smoothly again.

RRosio commented 2 years ago

Hello, I'm closing this issue as it has had no updates in the last 365 days. Please feel free to reopen this issue if it still needs to be addressed. Thank you!