Jupyter Notebook 500内部服务器错误-以前的解决方案均无效

时间:2019-04-27 08:00:55

标签: python jupyter-notebook internal-server-error

我启动的每个Jupyter笔记本电脑都出现错误“ 500:内部服务器错误”。

我已经仔细阅读了该问题的所有先前答案,但仍然遇到相同的错误。

我的笔记本昨天在工作,所以我发现这个错误很奇怪。

错误:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tornado/web.py", line 1590, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tornado/web.py", line 3006, in wrapper
    return method(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/notebook/services/config/handlers.py", line 19, in get
    self.finish(json.dumps(self.config_manager.get(section_name)))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/notebook/services/config/manager.py", line 25, in get
    recursive_update(config, cm.get(section_name))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/notebook/config_manager.py", line 103, in get
    recursive_update(data, json.load(f))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

编辑: 解决方案是:

/.jupyter/nbconfig/

并编辑notebook.json文件,使其看起来像这样:

{
  "load_extensions": {
    "jupyter-notebook-gist/extension": true,
    "jupyter-js-widgets/extension": true,
    "nbextensions_configurator/config_menu/main": true,
    "contrib_nbextensions_help_item/main": true,
    "equation-numbering/main": true
  }
}

0 个答案:

没有答案