ipympl icon indicating copy to clipboard operation
ipympl copied to clipboard

Why I still get Error displaying widget: model not found of ipympl 0.6.2?

Open GF-Huang opened this issue 4 years ago • 9 comments

Hi @thomasaarholt, so we I need to do now?

image

image

GF-Huang avatar Jan 10 '21 21:01 GF-Huang

Do you have widgets working in JupyterLab, what happens if you run:

from ipywidgets import IntSlider
IntSlider()

martinRenou avatar Jan 11 '21 07:01 martinRenou

I am tempted to say jupyterlab-plotly is breaking ipympl, the reason is that it might bring an outdated jupyter-widgets version

martinRenou avatar Jan 20 '21 18:01 martinRenou

I would try without jupyterlab-plotly until it gets updated for JuptyerLab 3

martinRenou avatar Jan 20 '21 18:01 martinRenou

jupyterlab-plotly

The latest release of jupyterlab-plotly is compatible with jlab 3.

They had one release that pulled in an outdated jupyter-widgets version, but then corrected that in a patch release.

jasongrout avatar Jan 20 '21 18:01 jasongrout

Yeah, install jupyterlab-plotly 4.14.3 instead of 4.14.1.

jasongrout avatar Jan 20 '21 18:01 jasongrout

Hi I am also getting this "Model not found" error on 0.6.3.

All extensions seem ok: Screenshot at 2021-02-11 15-24-13

Installed in a fresh conda env:

  • jupyter_client 6.1.11 pyhd8ed1ab_1 conda-forge
  • jupyter_core 4.7.1 py37h89c1867_0 conda-forge
  • jupyter_server 1.3.0 py37h89c1867_0 conda-forge
  • jupyterlab 3.0.7 pyhd8ed1ab_0 conda-forge
  • ipywidgets 7.6.3 pyhd3deb0d_0 conda-forge
  • ipympl 0.6.3 pyhd8ed1ab_0 conda-forge
  • matplotlib 3.3.1 1 conda-forge (same result with 3.2.2)
  • pythreejs 2.2.1 pyh9f0ad1d_0 conda-forge

Creating a IntSlider() works fine.

Interestingly, using pythreejsshows the same error:

import pythreejs as p3
p3.BoxGeometry(1, 2, 3)

Error displaying widget: model not found

The errors in the Chrome console:

  • Error: Module jupyter-matplotlib, semver range ^0.8.3 is not registered as a widget module
  • Error: Module jupyter-threejs, semver range ^2.1.0 is not registered as a widget module

I don't know if having pythreejs is causing the issue here.

It all works fine in classic notebook.

Thanks for any help.

nvaytet avatar Feb 11 '21 14:02 nvaytet

I don't know if having pythreejs is causing the issue here.

I think it's the source of your issue. pythreejs does not support JupyterLab 3 yet https://github.com/jupyter-widgets/pythreejs/pull/342.

If you really want pythreejs, I suggest using JupyterLab 2 for now. Otherwise, I would nuke this environment, start again with JupyterLab 3 without installing pythreejs this time.

martinRenou avatar Feb 11 '21 15:02 martinRenou

Agreed with what @martinRenou said :)

thomasaarholt avatar Feb 11 '21 15:02 thomasaarholt

Thanks, going to JupyterLab 2 fixed it for me.

nvaytet avatar Feb 12 '21 09:02 nvaytet