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 (JupyterLab 3.4.4)

See original GitHub issue

Dear @martinRenou and Team, sorry to bring this common issue up again, but I spent a whole day trying to figure out what is going wrong.

This is the code I run in my jupyter notebook (I am using a JupyterLab service built in our computational platform).

import sys
!{sys.executable} -m pip install ipyleaflet

from ipyleaflet import Map, basemaps, basemap_to_tiles

m = Map(
    basemap=basemap_to_tiles(basemaps.OpenStreetMap.Mapnik),
    center=(48.204793, 350.121558),
    zoom=3
    )
m

And I get this error: Error: Error displaying widget: model not found

In the browser logs I see: Error: Module jupyter-leaflet, semver range ^0.17 is not registered as a widget module (and some others)

The output of !jupyter labextension list is:

JupyterLab v3.4.4
/home/jovyan/.venv/share/jupyter/labextensions
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        nbdime-jupyterlab v2.1.1 enabled OK
        jupyter-matplotlib v0.10.5 enabled OK
        ipyevents v2.0.1 enabled OK
        jupyterlab-plotly v5.7.0 enabled OK
        jupyter-leaflet v0.17.1 enabled OK
        @krassowski/jupyterlab-lsp v3.10.1 enabled OK (python, jupyterlab-lsp)
        @jupyterlab/latex v3.1.0 enabled OK (python, jupyterlab-latex)
        @jupyterlab/git v0.36.0 enabled OK (python, jupyterlab-git)
        @jupyter-widgets/jupyterlab-manager v3.1.0 enabled OK (python, jupyterlab_widgets)
        @voila-dashboards/jupyterlab-preview v2.1.5 enabled OK (python, voila)

Other labextensions (built into JupyterLab)
   app dir: /home/jovyan/.venv/share/jupyter/lab


The following source extensions are overshadowed by older prebuilt extensions:
    @jupyter-widgets/jupyterlab-manager

Do you see some extension as an obvious culprit?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
elisabettaicommented, Oct 12, 2022

Ooooooh, actually a hard refresh (of our JupyterLab service) fixed it.

Thanks a lot!

0reactions
martinRenoucommented, Oct 12, 2022

ipyleaflet is not part of the Docker image. I install it from inside the jupyterlab notebook with:

Ok. Just in case you didn’t do it, you will need to hard refresh your browser page to make sure to pull the latest JS extensions.

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 >
Issue with stackview inside JupyterLab - "Error displaying widget
I installed stackview from cmd and restarting everything did not help. The code itself is rather short: from skimage.io import imread import ...
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: 5 Fixes
In this article, we're talking about the “Error displaying widget: model not found” problem when using Jupyter Labs in Python.
Read more >
Error displaying widget: model not found -- how to fix this?
So as to use Stacked, I installed version 8: > pip uninstall ipywidgets > pip install ipywidgets==8.0.0b But upon displaying a Stacked ...
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