jupyter / jupyter/notebook

why ? Jupyter --500 : Internal Server Error

Open
#4,081 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

Last login: Tue Oct  9 04:01:40 on ttys000
appledeMacBook-Pro:~ apple$ jupyter notebook
[I 05:44:15.864 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.0
[I 05:44:15.864 NotebookApp] Serving notebooks from local directory: /Users/apple
[I 05:44:15.864 NotebookApp] The Jupyter Notebook is running at:
[I 05:44:15.864 NotebookApp] http://localhost:8888/?token=4786096d5947b3bcda5eadf5e64cc0a9ee2f4f7070e1c4fc
[I 05:44:15.864 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 05:44:15.866 NotebookApp]

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=4786096d5947b3bcda5eadf5e64cc0a9ee2f4f7070e1c4fc
[I 05:44:16.262 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[E 05:44:23.127 NotebookApp] Uncaught exception GET /notebooks/Markdown%E8%AF%AD%E6%B3%95.ipynb (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/Markdown%E8%AF%AD%E6%B3%95.ipynb', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/site-packages/tornado/web.py", line 1590, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/usr/local/lib/python3.7/site-packages/tornado/web.py", line 3006, in wrapper
        return method(self, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/notebook/notebook/handlers.py", line 59, in get
        get_custom_frontend_exporters=get_custom_frontend_exporters
      File "/usr/local/lib/python3.7/site-packages/notebook/base/handlers.py", line 467, in render_template
        return template.render(**ns)
      File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
        return original_render(self, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
        return self.environment.handle_exception(exc_info, True)
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
        raise value.with_traceback(tb)
      File "/usr/local/lib/python3.7/site-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "/usr/local/lib/python3.7/site-packages/notebook/templates/page.html", line 154, in top-level template code
        {% block header %}
      File "/usr/local/lib/python3.7/site-packages/notebook/templates/notebook.html", line 120, in block "header"
        {% for exporter in get_custom_frontend_exporters() %}
      File "/usr/local/lib/python3.7/site-packages/notebook/notebook/handlers.py", line 24, in get_custom_frontend_exporters
        exporter = get_exporter(name)()
      File "/usr/local/lib/python3.7/site-packages/jupyter_contrib_nbextensions/nbconvert_support/collapsible_headings.py", line 44, in __init__
        collapsible_headings_options = cm.get('notebook').get(
      File "/usr/local/lib/python3.7/site-packages/notebook/services/config/manager.py", line 25, in get
        recursive_update(config, cm.get(section_name))
      File "/usr/local/lib/python3.7/site-packages/notebook/config_manager.py", line 103, in get
        recursive_update(data, json.load(f))
      File "/usr/local/Cellar/python/3.7.0/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 "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads
        return _default_decoder.decode(s)
      File "/usr/local/Cellar/python/3.7.0/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 "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 353, in raw_decode
        obj, end = self.scan_once(s, idx)
    json.decoder.JSONDecodeError: Expecting ',' delimiter: line 19 column 5 (char 550)
[E 05:44:23.137 NotebookApp] {
      "Host": "localhost:8888",
      "Cookie": "username-localhost-8888=\"2|1:0|10:1539035056|23:username-localhost-8888|44:YTYyN2VhMDY2YmJmNDM5YTg5YmY3YzYwZjMxMzg0ZTg=|8259c37ffc70f13cb31c48b734cd0036cec9bf194d0a93640d9b6b4afe8b2367\"; username-localhost-8890=\"2|1:0|10:1538453361|23:username-localhost-8890|44:ZTM5MDlmOGMyMTNkNGE5NGIwZTU1ZGU5Y2ViMGI5MzE=|2451aa80ce36fcf1e1c3357777905260bcffa592429a6efcf8ee7e645eafbf1b\"; username-localhost-8889=\"2|1:0|10:1538452536|23:username-localhost-8889|44:ZDc0ZDI0ZTU2OTY0NDgxN2JkY2UwZTNjZmVkNDQ2OGM=|6314bf92f8e2a6c8a6b9d134e211882b6f325c5731b9ef4e2d0a2350a785302f\"; _xsrf=2|353bcb8e|3506e6253847e9da558f83df41979688|1536852952",
      "Connection": "keep-alive",
      "Upgrade-Insecure-Requests": "1",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15",
      "Referer": "http://localhost:8888/tree",
      "Accept-Language": "zh-cn",
      "Accept-Encoding": "gzip, deflate"
    }
[E 05:44:23.137 NotebookApp] 500 GET /notebooks/Markdown%E8%AF%AD%E6%B3%95.ipynb (::1) 202.41ms referer=http://localhost:8888/tree

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The traceback names notebook/notebook/handlers.py, notebook/base/handlers.py, notebook/config_manager.py, and jupyter_contrib_nbextensions/nbconvert_support/collapsible_headings.py; start by inspecting the JSON loaded while opening Markdown语法.ipynb. Reproduce the 500 response and establish done as opening the notebook without this server error, with a regression test if the repository supports one.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.