2016-01-23 244 views
3

在过去几分钟内,我无法访问之前使用Python3.4创建的.ipynb文件。我去与这些文件的子目录,进入IPython笔记本错误:加载笔记本时出错

ipython3 notebook 

当我打开一个“新”的笔记本,我得到以下错误:

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

我无法打开旧笔记本电脑无论是。我得到的错误:

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

和终端内,它指出

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' 

我该如何解决这个问题?

+0

可能与此错误:https://github.com/ipython/ipython/issues/8294 – anjsimmo

回答

5

搜索nbsignatures.db。它应该是在这里:

~/.ipython/profile_default/security/nbsignatures.db 

或在这里:

~/Library/Jupyter/nbsignatures.db 

~代表你的home目录。

将此文件移至临时目录。

重新启动您的IPython Notebook服务器。

+0

删除'nbsignatures.db'文件解决了这个问题,即'RM〜/库/ Jupyter/nbsignatures .db' – ShanZhengYang

3

删除〜/ .ipython/profile_default/history.sqlite

这可以帮助我。

5

因为我找不到任何其他的答案中提到的文件,我找了另一种解决方案,并发现这是为我工作:

I solved this problem by changing the ownership of the ~/.local/share/jupyter directory from root to user.

https://github.com/ipython/ipython/issues/8997

+0

我有类似的问题。但是因为环境变量'XDG_DATA_HOME'的值格式错误为'/ .local/share'。 – jadelord

1

此次荣获”不管是每个人的问题,但我得到了下面的错误信息,因为磁盘实际上已满。

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