question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

7.0.0: Cannot load notebook with saved widget output

See original GitHub issue

Hello,

We have a problem with the new version of ipywidgets (or more likely with the widgetsnbextension), where a notebook with a saved widget output cannot be loaded.

When loading such a notebook the following error message is thrown in the browser (Firefox):

Notebook failed to load

The error was:
TypeError: Jupyter.notebook.kernel is null

See the error console for details.

It occurs in widgetsnbextension’s render function. It seems as if the kernel was not yet ready when the widget manager property is accessed.

We have the following library versions for Python2 and Python3 respectively:

root@de79f18a1f6a:~# pip2 show ipython notebook nbformat ipywidgets widgetsnbextension traitlets | grep Version -B1
Name: ipython
Version: 5.4.1
--
Name: notebook
Version: 5.0.0
--
Name: nbformat
Version: 4.3.0
--
Name: ipywidgets
Version: 7.0.0
--
Name: widgetsnbextension
Version: 3.0.0
--
Name: traitlets
Version: 4.3.2


root@de79f18a1f6a:~# pip3 show ipython notebook nbformat ipywidgets widgetsnbextension traitlets | grep Version -B1
Name: ipython
Version: 6.1.0
--
Name: notebook
Version: 5.0.0
--
Name: nbformat
Version: 4.3.0
--
Name: ipywidgets
Version: 7.0.0
--
Name: widgetsnbextension
Version: 3.0.0
--
Name: traitlets
Version: 4.3.2

We use Python2 kernels for our notebooks, and here is an example notebook with which we can reproduce the problem: https://gist.github.com/ak0ska/efd644222cbbe936c822f941c3e708fa

If I clear all output, save and reload the notebook, there is no error message. If I execute all cells, save the notebook and reload, I get the error message. The example works without problems with ipywdgets 6 and widgetsnbextension 2.

Any ideas what might be wrong?

Thank you, Akos

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:24 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelayecommented, Aug 27, 2017

The update to 3.0.2 also solved this error for me (using Chrome on OSX 10.12.6):

screenshot 2017-08-27 12 57 38

screenshot 2017-08-27 12 58 20

0reactions
jasongroutcommented, May 7, 2020

@Caelin1234 - what versions of the notebook/lab and ipywidgets do you have installed? What widgets are you using? Can you post a simplified example just using core ipywidgets (sliders, text boxes, etc.) illustrating the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter widget does not appear in notebook - Stack Overflow
Failed to display Jupyter Widget of type Button. If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean...
Read more >
Executing notebooks — nbconvert 7.2.7 documentation
nbconvert provides a convenient way to execute the input cells of an .ipynb notebook file and save the results, both input and output...
Read more >
04_Visualisation_KeplerGL - Databricks
#####Install Required Libs Here we are specifying a version for keplerGL. At the time of building these examples, the latest version did not...
Read more >
Nbdev v2 & Jupyter Widgets - Fast.ai forums
Perhaps there is a problem with indicating that the notebook is trusted, which prevents saving the widget output? I found some related ...
Read more >
Using Jupyter Widgets — Dataiku DSS 7.0 documentation
Using widgets¶. Open a new notebook, and enter sample widget code: Note. If you are using a custom code env, don't forget ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found