jupyter-widgets-contrib/ipycanvas

After update to 0.9.0: "Error displaying widget: model not found"

Closed this issue · 4 comments

Hello,

I set up a TLJH last year to deploy interactive learning material for students created using ipycanvas. However, after updating to 0.9.0 and ipywidgets to 7.6.3 I can not display canvases anymore. This minimal example is already throwing an error:

from ipycanvas import Canvas
c = Canvas(width=200, height=200)
c

Error displaying widget: model not found

Did I miss some change in the syntax or could there be a conflict with versions. I googled the error message and just found something about incompatibilities between (other) Jupyter libraries.

$ pip freeze

alembic==1.4.3
asn1crypto==0.24.0
async-generator==1.10
attrs==20.2.0
backcall==0.2.0
bleach==3.2.1
certifi==2020.6.20
certipy==0.1.3
cffi==1.12.3
chardet==3.0.4
conda==4.8.1
conda-package-handling==1.3.11
cryptography==2.7
decorator==4.4.2
defusedxml==0.6.0
entrypoints==0.3
idna==2.8
import-ipynb==0.1.3
importlib-metadata==2.0.0
ipycanvas==0.9.0
ipykernel==5.3.4
ipython==7.18.1
ipython-genutils==0.2.0
ipywidgets==7.6.3
jedi==0.17.2
Jinja2==2.11.2
json5==0.9.5
jsonschema==3.2.0
jupyter-client==6.1.7
jupyter-core==4.6.3
jupyterhub==1.0.0
jupyterlab==2.2.9
jupyterlab-pygments==0.1.2
jupyterlab-server==1.2.0
jupyterlab-widgets==1.0.0
libarchive-c==2.8
Mako==1.1.3
MarkupSafe==1.1.1
mistune==0.8.4
nbclient==0.5.1
nbconvert==6.0.7
nbformat==5.0.8
nbgitpuller==0.7.2
nbresuse==0.3.6
nest-asyncio==1.4.2
notebook==6.0.3
nteract-on-jupyter==2.1.3
numpy==1.19.2
oauthlib==3.1.0
packaging==20.4
pamela==1.0.0
pandocfilters==1.4.3
parso==0.7.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.0.1
prometheus-client==0.8.0
prompt-toolkit==3.0.8
psutil==5.7.3
ptyprocess==0.6.0
pycosat==0.6.3
pycparser==2.19
Pygments==2.7.2
pyOpenSSL==19.0.0
pyparsing==2.4.7
pyrsistent==0.17.3
PySocks==1.7.0
python-dateutil==2.8.1
python-editor==1.0.4
pyzmq==19.0.2
requests==2.22.0
ruamel-yaml==0.15.46
Send2Trash==1.5.0
six==1.12.0
SQLAlchemy==1.3.20
terminado==0.9.1
testpath==0.4.4
tornado==5.1.1
tqdm==4.32.1
traitlets==5.0.5
urllib3==1.24.2
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.1
zipp==3.4.0

I would really appreciate any support on this topic and would gladly help out with additional information. Thanks in advance!

Kind regards,
Dominik

Can you run jupyter labextension list

Can you run jupyter labextension list

Hello Martin,

thanks for your fast response. Quicker than I could have a lunch break :-) I thought that Jupyter Lab would remember its extensions but your guess was correct:

$ jupyter labextension list
JupyterLab v2.2.9
Known labextensions:
   app dir: /opt/tljh/user/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK

I simply rebuilt ipycanvas and it got fixed.

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas
$ jupyter labextension list
JupyterLab v2.2.9
Known labextensions:
   app dir: /opt/tljh/user/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        ipycanvas v0.9.0  enabled  OK

It is working now and I even have the feeling that my animations are running a lot smoother now. Thanks a lot!

Kind regards,
Dominik

Cool! Happy you could fix it.

Yeah, ipycanvas had a couple of performance improvements in latest releases.

Glad to see that the project is still active. Thanks a lot for your great work!