matplotlib / ipympl

Matplotlib Jupyter Integration
https://matplotlib.org/ipympl/
BSD 3-Clause "New" or "Revised" License
1.58k stars 226 forks source link

Widget loads, returns Error displaying widget: model not found #154

Open jeffneuen opened 4 years ago

jeffneuen commented 4 years ago

It's possible that this is a duplicate of https://github.com/matplotlib/jupyter-matplotlib/issues/112, but I have tried the following steps, and am receiving the errors that the model is not found.

this is from a clean 18.04 VM:


:$ sudo apt update
:$ sudo apt upgrade
:$ wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
:$ chmod +x Anaconda3-2019.10-Linux-x86_64.sh
:$ ./Anaconda3-2019.10-Linux-x86_64.sh
[logout]
[login]
(base) :$ conda install -c conda-forge ipympl
(base) :$ conda install nodejs
(base) :$ jupyter labextension install @jupyter-widgets/jupyterlab-manager
(base) :$ jupyter labextension install jupyter-matplotlib
(base) :$ git clone https://github.com/matplotlib/jupyter-matplotlib.git
(base) :$ cd jupyter-matplotlib
(base) :$ jupyter-lab

navigate to examples/ipympl.ipynb

Second cell returns: Error displaying widget: model not found

I have tried to follow the instructions precisely -- am I missing something here?

I'm happy to provide any debug information that would help. I have also tried other iterations including updating conda, but they have all given this error.

thespacedoctor commented 4 years ago

Me too!

phillies commented 4 years ago

Same here. Set up as docker image, leads to the error "model not found". If I run jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib again it sometimes changes the error to "Loading widget..." but nothing happens. Docker based on nvidia/cuda:10.2-base which is ubuntu 18.04 with the latest conda packages as of today. Here's a gist with a stripped-down Dockerfile that reproduces the issue: https://gist.github.com/phillies/63cf8d880046f7c1e4777e6962902256

martinRenou commented 4 years ago

I don't see anything wrong in your Docker image... Which version of JupyterLab are you using? It must be >=1.0

jeffneuen commented 4 years ago

I am using jupyterlab 1.1.4.

zwfcrazy commented 4 years ago

Same problem here. The configuration below does not work.

ipympl                    0.2.1                 py36_1001    conda-forge
ipython                   7.10.2           py36h39e3cac_0
ipywidgets                7.5.1                      py_0    conda-forge
jupyterlab                1.0.2            py36hf63ae98_0  
matplotlib                3.1.1            py36h5429711_0  
nodejs                    10.13.0              he6710b0_0  

I tried different versions of jupyterlab, nodejs......nothing worked...

thespacedoctor commented 4 years ago

A full restart of jupyterHub solved the issue for me. Not a server restart from the web-interface but a restart of the jupyterHub process.

davidfokkema commented 4 years ago

I fixed this with https://github.com/matplotlib/jupyter-matplotlib/issues/130#issuecomment-567931502

zwfcrazy commented 4 years ago

I fixed this with #130 (comment)

your solution truly works, thank you!