ipympl: "Error displaying widget: model not found" again
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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (6 by maintainers)
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!