笔记本验证失败

问题描述 投票:1回答:1

在运行jupyter笔记本时,出现此错误。有什么主意吗?

An invalid notebook may not function properly. The validation error was:
Notebook validation failed: ['outputPrepend', 'outputPrepend', 'outputPrepend', 'outputPrepend', 'outputPrepend'] has non-unique elements:
[
 "outputPrepend",
 "outputPrepend",
 "outputPrepend",
 "outputPrepend",
 "outputPrepend"
]
python-3.x jupyter-notebook runtime-error jupyter-console
1个回答
0
投票

我有同样的问题。我的jupyter的日志是这样的

(venv) > jupyter notebook     
[I 18:12:33.188 NotebookApp] Serving notebooks from local directory: /home/engmrgh/Projects/
[I 18:12:33.188 NotebookApp] The Jupyter Notebook is running at:
[I 18:12:33.188 NotebookApp] http://localhost:8888/?token=3a9a191653274c25f7cf09049d87b8588fefbda0ec48fcd4
[I 18:12:33.189 NotebookApp]  or http://127.0.0.1:8888/?token=3a9a191653274c25f7cf09049d87b8588fefbda0ec48fcd4
[I 18:12:33.189 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:12:33.255 NotebookApp] 

    To access the notebook, open this file in a browser:
        file:///home/engmrgh/.local/share/jupyter/runtime/nbserver-6233-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=3a9a191653274c25f7cf09049d87b8588fefbda0ec48fcd4
     or http://127.0.0.1:8888/?token=3a9a191653274c25f7cf09049d87b8588fefbda0ec48fcd4
[E 18:12:42.647 NotebookApp] Notebook JSON is invalid: ['outputPrepend', 'outputPrepend'] has non-unique elements

    Failed validating 'uniqueItems' in code_cell['properties']['metadata']['properties']['tags']:

    On instance['cells'][38]['metadata']['tags']:
    ['outputPrepend', 'outputPrepend']
[W 18:12:42.707 NotebookApp] Notebook LDA.ipynb is not trusted
[I 18:12:44.126 NotebookApp] Kernel started: 28c189d6-a445-417a-9577-88fadd4464ea
[I 18:24:35.296 NotebookApp] Saving file at /LDA.ipynb
[W 18:24:35.296 NotebookApp] Notebook LDA.ipynb is not trusted

以上日志的重要部分是此部分:

On instance['cells'][38]['metadata']['tags']: ['outputPrepend', 'outputPrepend']

[基本上说是木星笔记本的单元格38中有问题。当我以图片中所示的方式启用元数据并转到单元格38时,我看到元数据是为验证而显示的错误,删除该错误可以解决问题。enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.