Skip to content
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

install causing '500 : Internal Server Error' when opening notebook #1347

Open
maajdl opened this issue Sep 12, 2018 · 3 comments
Open

install causing '500 : Internal Server Error' when opening notebook #1347

maajdl opened this issue Sep 12, 2018 · 3 comments

Comments

@maajdl
Copy link

maajdl commented Sep 12, 2018

Hello,

I just freshly installed Anaconda3.
Then, I installed jupyter_contrib_nbextensions like this:

pip install jupyter_contrib_nbextensions

Starting Jupyter was fine, but I noticed this message in the Nbextension tab:

Traceback (most recent call last):
  File "C:\Users\Gabrielle\Anaconda3\lib\site-packages\tornado\web.py", line 1541, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "C:\Users\Gabrielle\Anaconda3\lib\site-packages\tornado\web.py", line 2949, in wrapper
    return method(self, *args, **kwargs)
  File "C:\Users\Gabrielle\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\Gabrielle\Anaconda3\lib\site-packages\notebook\services\config\manager.py", line 25, in get
    recursive_update(config, cm.get(section_name))
  File "C:\Users\Gabrielle\Anaconda3\lib\site-packages\notebook\config_manager.py", line 103, in get
    recursive_update(data, json.load(f))
  File "C:\Users\Gabrielle\Anaconda3\lib\json\__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "C:\Users\Gabrielle\Anaconda3\lib\json\__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Gabrielle\Anaconda3\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Gabrielle\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)

Opening a notebook produces then this error:

500 : Internal Server Error

I then tried to uninstall and install back from github tarball, to no avail.

I like the Nbextension, I hope you can easily find a fix!

Best regards,

Michel

@clatonhendricks
Copy link

Were you able to find a solution. I get the same error

Regards,
Claton

@clatonhendricks
Copy link

clatonhendricks commented Apr 16, 2019

@maajdl I was able to resolve the prb. For me notebook.json file was empty so I copied the contents of a working machine and it worked.
Here are details.
File location - C:\Users<YOUR USERPROILE>.jupyter\nbconfig\notebook.json

File contents:
{ "load_extensions": { "snippets/main": true, "cell_filter/cell_filter": false, "varInspector/main": true, "execute_time/ExecuteTime": false, "toggle_all_line_numbers/main": true, "scratchpad/main": true, "freeze/main": false, "table_beautifier/main": false, "hinterland/hinterland": true, "hide_input/main": false, "MarkdownCell": { "cm_config": { "lineWrapping": true } }, "CodeCell": { "cm_config": { "lineWrapping": true } }, "nbextensions_configurator/config_menu/main": true } }

Once you edit the contents of notebook.json then restart your Jupyter notebook and it should work.

HTH,
Claton

@ghost
Copy link

ghost commented Sep 29, 2019

@clatonhendricks Hey Claton, I think that I have a similar problem to the one mentioned above and when I open my notebook.json file with VisualStudio I see this:

image

However, I don't know if that means it's considered empty? I have never opened it before now. With your solution, do you think that I could copy and paste what you wrote for file contents above? I just don't want to disturb the contents of the file because I don't really know what I am doing with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants