Skip to content

json.decoder.JSONDecodeError #1211

@Marxlp

Description

@Marxlp

When I executed jupyter nbextension list I get below error

Known nbextensions:
Traceback (most recent call last):
  File "/home/marxlp/anaconda3/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/home/marxlp/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 266, in lae
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/marxlp/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 658, ie
    app.start()
  File "/home/marxlp/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 988, in start
    super(NBExtensionApp, self).start()
  File "/home/marxlp/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 255, in stt
    self.subapp.start()
  File "/home/marxlp/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 960, in start
    self.list_nbextensions()
  File "/home/marxlp/anaconda3/lib/python3.5/site-packages/notebook/nbextensions.py", line 943, in list_s
    data = cm.get(section)
  File "/home/marxlp/anaconda3/lib/python3.5/site-packages/notebook/config_manager.py", line 85, in get
    recursive_update(data, json.load(f))
  File "/home/marxlp/anaconda3/lib/python3.5/json/__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/marxlp/anaconda3/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/home/marxlp/anaconda3/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/marxlp/anaconda3/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 9 column 22 (char 279)

At the same time, when I started jupyter, almost same error appeared,

[E 21:59:54.563 NotebookApp] Uncaught exception GET /api/config/notebook?_=1517147994320 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/config/notebook?_=1517147994320', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'X-Requested-With': 'XMLHttpRequest', 'X-Xsrftoken': '2|bd47d974|3c4dc694b7b2d96299ebd2e626afe8f8|1517147993', 'Cookie': 'username-localhost-8888="2|1:0|10:1517147993|23:username-localhost-8888|44:MGZhMjU2ODQzZjAwNDBlMTk0YmJmOWJiYTQ0MGRlZDA=|169f35d60a658c56672b08f30d2a40519f193b1f41cd316e3f5cdce5f0996cd0"; _xsrf=2|bd47d974|3c4dc694b7b2d96299ebd2e626afe8f8|1517147993', 'Connection': 'keep-alive', 'Referer': 'http://localhost:8888/notebooks/test_torch_functions.ipynb', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json, text/javascript, */*; q=0.01', 'Accept-Language': 'en-US,en;q=0.5', 'Host': 'localhost:8888'})
    Traceback (most recent call last):
      File "/home/marxlp/anaconda3/lib/python3.5/site-packages/tornado/web.py", line 1510, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/home/marxlp/anaconda3/lib/python3.5/site-packages/tornado/web.py", line 2898, in wrapper
        return method(self, *args, **kwargs)
      File "/home/marxlp/anaconda3/lib/python3.5/site-packages/notebook/services/config/handlers.py", line 19, in get
        self.finish(json.dumps(self.config_manager.get(section_name)))
      File "/home/marxlp/anaconda3/lib/python3.5/site-packages/notebook/services/config/manager.py", line 25, in get
        recursive_update(config, cm.get(section_name))
      File "/home/marxlp/anaconda3/lib/python3.5/site-packages/notebook/config_manager.py", line 85, in get
        recursive_update(data, json.load(f))
      File "/home/marxlp/anaconda3/lib/python3.5/json/__init__.py", line 268, in load
        parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
      File "/home/marxlp/anaconda3/lib/python3.5/json/__init__.py", line 319, in loads
        return _default_decoder.decode(s)
      File "/home/marxlp/anaconda3/lib/python3.5/json/decoder.py", line 339, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/home/marxlp/anaconda3/lib/python3.5/json/decoder.py", line 357, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 9 column 22 (char 279)

I have tried reinstall jupyter and nbextensions. But it didn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions