(root) C:\Users\Arun>jupyter notebook list
Currently running servers:
http://localhost:8890/?token=d70754b078073066f1c8003b303db1bf02a2a6e0eb2a4081 :: c:\Users\Arun\Github\Notebook\python-machine-learning-book-master
http://localhost:8888/?token=969aa0d7636e12fb85b8bca99671887456c71c682b048352 :: c:\Users\Arun\Github\Sublime
http://localhost:8889/?token=ed5ad57d94e7ff7ad72b4be87721807605e44297398b96f0 :: c:\Users\Arun\Github\Sublime
Traceback (most recent call last):
File "C:\Users\Arun\Anaconda3\Scripts\jupyter-notebook-script.py", line 5, in
sys.exit(notebook.notebookapp.main())
File "C:\Users\Arun\Anaconda3\lib\site-packages\jupyter_core\application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, *kwargs)
File "C:\Users\Arun\Anaconda3\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "C:\Users\Arun\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 1197, in start
super(NotebookApp, self).start()
File "C:\Users\Arun\Anaconda3\lib\site-packages\jupyter_core\application.py", line 256, in start
self.subapp.start()
File "C:\Users\Arun\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 308, in start
for serverinfo in list_running_servers(self.runtime_dir):
File "C:\Users\Arun\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 1278, in list_running_servers
info = json.load(f)
File "C:\Users\Arun\Anaconda3\lib\json__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, *kw)
File "C:\Users\Arun\Anaconda3\lib\json__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\Arun\Anaconda3\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Arun\Anaconda3\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
That sounds like a file that should be JSON is not valid JSON - maybe it's been left over as an empty file. We should probably handle that with a nicer error message.
This is because it was finding .html files as well. I believe this is fixed in the latest commit ( #4137 ) in notebook\notebookapp.py line 1842 which specifies json files only
This is because it was finding .html files as well. I believe this is fixed in the latest commit (??? ) in notebook\notebookapp.py line 1842 which specifies json files only
I think you mean commit adcb7025ca. (FWIW: Commits can be referenced in GitHub comments without a leading hashmark.) By using the hashmark the way you do, you are referencing the issue with that number. That issue I consider unrelated.
I have the same issue, but with a slightly different error message:
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
But I cannot find the location of my config file. There are directories ~/miniconda3/envs/loihi/etc/jupyter/nbconfig/ and ~/.jupyter/ but it's not in there.
I can start servers, but I get this message if I try to stop or list them.
Found #4283 which was fixed by #4284. Upgrading from notebook==5.6.0 to notebook==5.7.8 fixed the issue for me.
Found #4283 which was fixed by #4284. Upgrading from
notebook==5.6.0tonotebook==5.7.8fixed the issue for me.
Indeed, the upgrade fixes it. Unfortunately, notebook==5.7.4 (where the patch was introduced) is incompatible with Python 3.5 and thus one is stuck with the buggy version on Python 3.5.
The 5.7 series should still be supporting 3.5, so if you can see what's making it incompatible, please send a pull request to fix it.
As far as I can tell, there are at least no conda packages of the 5.7 series for 3.5. 5.6.0 is the last to have been built for 3.5.
Of course, if 5.6 is still being updated, I can quickly send a PR since it should only be the one line that needs to be changed.
Oh, conda packages. As far as I know, conda has stopped building everything for Python 3.5, and nothing we do in this repo will affect that. You probably need to either build a conda environment with a newer Python, or uninstall the package with conda and install a newer version with pip.
Right, sorry for the confusion about that. Thanks!
I don't know why, but I solved this exact issue by upgrading from python 3.6 to python 3.7 (the other suggested fix didn't work).
as a workaround you can kill the process by its PID
For example if Jupyter notebook runs on port 8888
sudo lsof -i tcp:8888
kill -9 PID
After that you can restart your notebook and the kernel should not die immediately after it starts.
My python version is 3.7.6 and ipython version is 7.8.0. Same problem and haven't solved yet.
Same issue with Python 3.7.4 (not conda) and notebook==6.0.1 and ipython==7.7.0
This is because it was finding .html files as well. I believe this is fixed in the latest commit ( #4137 ) in notebook\notebookapp.py line 1842 which specifies json files only
Confirmed that the html files were the issue for me, if you're looking for a quick and dirty fix without changing your python or jupyter versions you can find the directory it's looking in with jupyter --runtime-dir and delete the .html files there.
Most helpful comment
Confirmed that the html files were the issue for me, if you're looking for a quick and dirty fix without changing your python or jupyter versions you can find the directory it's looking in with
jupyter --runtime-dirand delete the .html files there.