-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jupyter notebook list - json.decoder.JSONDecodeError: #2416
Comments
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 |
I think you mean commit adcb702. (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:
But I cannot find the location of my config file. There are directories I can start servers, but I get this message if I try to |
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 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 |
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 |
To get the token for your notebook; just Ctrl-C the process in the terminal, and it will show the token, and ask you to confirm quitting. Just hit "n" to keep it running. |
(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)
The text was updated successfully, but these errors were encountered: