Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPython Notebook error: Error loading notebook

Within the past few minutes, I have not been able to access any of the .ipynb files previously created with Python3.4. I go to the subdirectory with these files, enter

ipython3 notebook

When I open a "New" notebook, I get the following error:

Unexpected error while saving file: Untitled1.ipynb database disk image is malformed

I cannot open old notebooks either. I get the error:

An unknown error occurred while loading this notebook. This version can load notebook formats v4 or earlier. See the server log for details.

and within the Terminal, it states

kernels (twice to skip confirmation).
[E 00:30:22.352 NotebookApp] Unhandled error in API request
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/traitlets/traitlets.py", line 460, in get
        value = obj._trait_values[self.name]
    KeyError: 'db'

How can I fix this?

like image 245
ShanZhengYang Avatar asked Jan 23 '16 05:01

ShanZhengYang


3 Answers

This won't be the issue for everyone, but I got the below error message because the disk was actually full.

An unknown error occurred while loading this notebook. This version can load notebook formats v4 or earlier. See the server log for details.
like image 144
Steven Avatar answered Sep 23 '22 21:09

Steven


remove ~/.ipython/profile_default/history.sqlite

this helps for me.

like image 35
Moonlight Knight Avatar answered Sep 22 '22 21:09

Moonlight Knight


In my case, my nbsignatures.db was here, after removing it it can operate normally.

~/.local/share/jupyter/nbsignatures.db

Remember to restart your jupyter notebook server. I restarted several times for this to work.

like image 26
hongkail Avatar answered Sep 22 '22 21:09

hongkail