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.

"Error displaying widget: model not found" again

See original GitHub issue

After an update of Jupyterlab I cannot use ipympl anymore as the minimal example

%matplotlib widget
from matplotlib import pyplot as plt

fig, ax = plt.subplots()

only shows “Error displaying widget: model not found”.

Unfortunately something in the Jupyter/matplotlib/ipympl machinery seems very fragile so that this is easily triggered. In the past a simple re-install of ipympl helped but this does not seem to work here at the moment.

My environment looks like

 3.8.10 | packaged by conda-forge | (default, May 11 2021, 06:25:23) [MSC v.1916 64 bit (AMD64)]
ipympl version: 0.7.0
jupyter core     : 4.7.1
jupyter-notebook : 6.4.0
qtconsole        : not installed
ipython          : 7.23.1
ipykernel        : 5.5.5
jupyter client   : 6.1.12
jupyter lab      : 3.0.15
nbconvert        : 6.0.7
ipywidgets       : 7.6.3
nbformat         : 5.1.3
traitlets        : 5.0.5
Config option `kernel_spec_manager_class` not recognized by `ListNBExtensionsApp`.
Known nbextensions:
  config dir: C:\tools\miniconda3\envs\jupyter\etc\jupyter\nbconfig
    notebook section
      jupyter-matplotlib/extension enabled
      - Validating: ok
      jupytext/index enabled
      - Validating: ok
      nbdime/index enabled
      - Validating: ok
      voila/extension enabled
      - Validating: ok
      jupyter-js-widgets/extension enabled
      - Validating: ok
Config option `kernel_spec_manager_class` not recognized by `ListLabExtensionsApp`.
[W 2021-05-20 18:11:49.703 LabApp] Config option `kernel_spec_manager_class` not recognized by `LabApp`.
JupyterLab v3.0.15
C:\tools\miniconda3\envs\jupyter\share\jupyter\labextensions
        jupyter-matplotlib v0.9.0 enabled ok
        jupyterlab-jupytext v1.3.1 enabled ok (python, jupytext)
        nbdime-jupyterlab v2.1.0 enabled ok
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)
        @ryantam626/jupyterlab_code_formatter v1.4.10 enabled ok (python, jupyterlab-code-formatter)
        @voila-dashboards/jupyterlab-preview v2.0.2 enabled ok (python, voila)

Chrome complains in the Javascript console that Uncaught (in promise) Error: Module jupyter-matplotlib, semver range ^0.9.0 is not registered as a widget module and earlier errors such as Plugin 'matplotlib-jupyter:main' failed to activate.

When using a completely fresh conda environment ipympl has always worked here, but something breaks when updating parts of the environment and then I do not see what is broken and an simple reinstall (conda uninstall ipympl, conda install -c conda-forge ipympl) works but the error message remains and the plot cannot be displayed.

Any hint how to diagnose or prevent this from happening would be appreciated.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ianhicommented, Mar 27, 2022

Hi @prajwel can you please open a new issue and fill out the issue template (e.g. jupyterlab version etc) that will make it easier to debug thanks!

0reactions
prajwelcommented, Mar 26, 2022

Hi @martinRenou, I have been checking new updates to ipympl to see if this error goes away, but so far only the ipympl==0.8.0 works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Error displaying widget: model not found” with Jupyter lab #112
I followed your installation instructions on a fresh python and jupyter setup with pip but end up with “Error displaying widget: model not...
Read more >
Jupyter-matplotlib: Error displaying widget: model not found
Solved! Turned out ipywidget 7.5 breaks jupyter lab and it isaffecting other libraries too. https://github.com/plotly/plotly.py/issues/1659.
Read more >
Error displaying widget: model not found -- how to fix this?
'Error displaying widget: model not found'. I tryed in jupyterlab2.x. It works. Does anyone knows how to fixed this problem.It will be very ......
Read more >
Error displaying widget; model not found: 5 Fixes
Error displaying widget: model not found: 5 Fixes · Check your ipywidgets version · Reinstall ipywidgets · Reinstall jupyterlab_widgets · Install ...
Read more >
Error displaying widget: model not found Yesterday Sweetviz ...
Hi,. I'm facing that bug: Error displaying widget: model not found. Yesterday, happened with Sweetviz, then I copied others recent snippets to work....
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