Hello,
I have installed Anaconda3-5.1.0 for windows. Afterwards, I installed nbextensions for Jupyter notebook.
I have used following code in Anaconda Prompt for nbextension installation:
pip install jupyter_contrib_nbextensions
jupyter-contrib nbextension install --sys-prefix
When i open Jupyter notebook and click on NBextensions tab, I see following error and also nothing is loaded in notebook.
Snap! Failed to load config section "notebook"
Internal Server Error
Traceback (most recent call last):
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\web.py", line 1510, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\web.py", line 2898, in wrapper
return method(self, *args, **kwargs)
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\config\handlers.py", line 19, in get
self.finish(json.dumps(self.config_manager.get(section_name)))
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\config\manager.py", line 25, in get
recursive_update(config, cm.get(section_name))
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\config_manager.py", line 85, in get
recursive_update(data, json.load(f))
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\json\__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\json\__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\AA67116\AppData\Local\Continuum\anaconda3\lib\json\decoder.py", line 342, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 15 column 1 (char 360)
I am struggling to figure it out for a while already. I would really appreciate, if you guys help me out here.
Thanks in advance.
Can you check your JSON config files using this snippet:
import glob
import os
import json
from jupyter_core.paths import jupyter_config_path
for d in jupyter_config_path():
for p in glob.glob(os.path.join(d, 'nbconfig', '*.json')):
try:
with open(p, 'r') as f:
json.load(f)
print('File {0} is OK.'.format(p))
except json.decoder.JSONDecodeError:
print('Failed JSON file is:', p)
Hello,
thanks a lot for reply.
here is output:
File C:\Users\kabbe\.jupyter\nbconfig\common.json is OK.
Failed JSON file is: C:\Users\kabbe\.jupyter\nbconfig\notebook.json
File C:\Users\kabbe\.jupyter\nbconfig\tree.json is OK.
File C:\Users\kabbe\AppData\Local\Continuum\anaconda3\etc\jupyter\nbconfig\notebook.json is OK.
File C:\Users\kabbe\AppData\Local\Continuum\anaconda3\etc\jupyter\nbconfig\tree.json is OK.
File C:\ProgramData\jupyter\nbconfig\notebook.json is OK.
File C:\ProgramData\jupyter\nbconfig\tree.json is OK.
So there is an error in your configuration file C:\Users\kabbe\.jupyter\nbconfig\notebook.json.
Can you take a look at it why it fails or show the contents of the file ?
Hello,
Please see the content below.
Thanks in advance.
{
"load_extensions": {
"snippets/main": true,
"cell_filter/cell_filter": false,
"varInspector/main": true,
"execute_time/ExecuteTime": true,
"toggle_all_line_numbers/main": true,
"scratchpad/main": true,
"freeze/main": true,
"table_beautifier/main": false,
"hinterland/hinterland": true,
"hide_input/main": true
}
}
{
"MarkdownCell": {
"cm_config": {
"lineWrapping": true
}
},
"CodeCell": {
"cm_config": {
"lineWrapping": true
}
}
}
This is invalid JSON, so the error can be expected. You can either remove the second part of the file or fix the structure and merge the two parts by removing lines 14&15 and adding a ,.
Try pasting it at https://jsonlint.com so you can check if it is valid JSON.
Great!. It works now. Appreciated for your help.
Most helpful comment
This is invalid JSON, so the error can be expected. You can either remove the second part of the file or fix the structure and merge the two parts by removing lines 14&15 and adding a
,.Try pasting it at https://jsonlint.com so you can check if it is valid JSON.