xeus-python icon indicating copy to clipboard operation
xeus-python copied to clipboard

`Error displaying widget: model not found` when using `ipywidgets` interact

Open jtpio opened this issue 2 years ago • 7 comments

Using the ipywidgets interact (more precisely interactive) gives the following error:

Error displaying widget: model not found

However this does not seem to be an issue with ipykernel.

To reproduce, go to https://github.com/jupyterlab/jupyterlab-demo and open the demo on Binder: https://mybinder.org/v2/gh/jupyterlab/jupyterlab-demo/master?urlpath=lab

image

This was also noticed with jupyterlite-xeus-python in https://github.com/jupyter/try-jupyter/pull/42

jtpio avatar Sep 15 '23 07:09 jtpio

I think the jupyterlab-demo is broken because of https://github.com/jupyterlab/jupyterlab-demo/blob/master/.binder/environment.yml#L21

If you're using latest ipywidgets, you should be using the latest xeus-python which makes use of the new comm package.

martinRenou avatar Sep 15 '23 07:09 martinRenou

Concerning the lite deployment on try-jupyter. I am not even able to execute the cell that uses interact.

This is very probable we are hitting an issue similar to https://github.com/emscripten-forge/recipes/issues/619?notification_referrer_id=NT_kwDOAUNyE7M3NDk5MzQ0NzA2OjIxMTk3MzMx#issuecomment-1718013278 where scipy and matplotlib are incompatible on emscripten-forge and leads to issues.

martinRenou avatar Sep 15 '23 07:09 martinRenou

Ah ok, sure we can at least update the demo repo.

Over on https://github.com/jupyter/try-jupyter/pull/42 the error might be different then? Haven't checked yet whether it's related to xeus python or only in jupyterlite-xeus-python:

Uncaught (in promise) RuntimeError: indirect call signature mismatch

image

jtpio avatar Sep 15 '23 07:09 jtpio

Concerning the lite deployment on try-jupyter. I am not even able to execute the cell that uses interact.

Normally the first 2 cells execute fine. The one calling interact throws an error in the dev tools console.

jtpio avatar Sep 15 '23 07:09 jtpio

I'm having the same as you in the lite deployment.

I do believe it's because of our build of scipy on emscripten-forge that conflicts with matplotlib (they build against different version of qhull and that may be the issue). We would want to troubleshoot this there.

I personally am not even able to build scipy on emscripten-forge, we need help :D.

martinRenou avatar Sep 15 '23 07:09 martinRenou

Looks like there is a build of scipy available though:

image

jtpio avatar Sep 15 '23 07:09 jtpio

There is, but it's broken :) and it does not build anymore if you try rebuilding it

martinRenou avatar Sep 15 '23 08:09 martinRenou