jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

`jupyter notebook list` command fails with the error: json.decoder.JSONDecodeError #482

Open sergunya opened 5 years ago

sergunya commented 5 years ago

Hello! In case when I run jupyter notebooks (notebook >= 5.7.3), jupyter generates HTML file like nbserver-14260-open.html in directory /Users/<USER_NAME>/Library/Jupyter/runtime. Therefore, command jupyter notebook list fails for previous versions of jupyter notebook with outlined below stacktrace:

Traceback (most recent call last):
  File "/Users/sergey.larionov/anaconda3/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1605, in start
    super(NotebookApp, self).start()
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 489, in start
    serverinfo_list = list(list_running_servers(self.runtime_dir))
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1701, in list_running_servers
    info = json.load(f)
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/sergey.larionov/anaconda3/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)