InsightSoftwareConsortium / itkwidgets

An elegant Python interface for visualization on the web platform to interactively generate insights into multidimensional images, point sets, and geometry.
https://itkwidgets.readthedocs.io/
Apache License 2.0
581 stars 83 forks source link

JupyterLab 3.x "Model not found error" #397

Open FuriouslyCurious opened 3 years ago

FuriouslyCurious commented 3 years ago

Heads up for the devs: I am trying out ITK examples in latest JupyterLab 3.0, but unfortunately getting following error message:

Error displaying widget: model not found

All packages are installed correctly and jupyter lab extensions are also enabled.

nickruof commented 3 years ago

Also seeing the same behavior. My itkwidgets is up-to-date and all dependencies are as well. The widgets for matplotlib are working for me, but the itkwidgets are giving me the same error.

thewtex commented 3 years ago

@FuriouslyCurious @nickruof thanks for the report. Yes, we will updates for JupyterLab 3, but the installation experience for users should be much better.

jungerm2 commented 3 years ago

If it's of any help at all, here's a minimal example that reproduces this error:

from pyvista import examples
from itkwidgets import view

airplane = examples.load_airplane()
view(geometries={'Airplane':airplane})

I also have everything fully updated/refreshed/rebuilt.

haesleinhuepf commented 2 years ago

Hi Matt @thewtex ,

I just hit this issue on our HPC cluster (where the fancy GPUs are ;-) ) which uses jupyter lab 3.0.16.

image

Are there any updates? I'd be happy to help fixing this, if I can. My experience with jupyter widgets is limited but stackview works on our system.

Best, Robert

thewtex commented 2 years ago

Hi Robert! @haesleinhuepf

A new alpha version is available for JupyterLab installable via:

pip install --upgrade --pre itkwidgets[lab]

with docs on ReadTheDocs.

Issues should be expected (alpha alpha), but feedback and reports and suggestions and patches are welcome and appreciated!

Thanks! Matt

haesleinhuepf commented 2 years ago

Amazing Matt @thewtex !

Just some instant feedback for now: I had to also execute this, because an error message suggested so:

pip install --upgrade --pre itk

Then, the output looks like this: image

Is there maybe anything else I should install / try? I'm running on Windows / Chrome btw.

Best, Robert

linmeon commented 1 year ago

惊人的马特@thewtex!

现在只是一些即时反馈:我还必须执行此操作,因为一条错误消息提示:

pip install --upgrade --pre itk

然后,输出如下所示: 图片

还有什么我应该安装/尝试的吗?我在 Windows / Chrome 上运行。

最好的, 罗伯特

same error after install pre version

thewtex commented 1 year ago

Hi,

Instead of,

pip install --upgrade --pre itk

please use:

pip install --upgrade --pre 'itkwidgets[lab]'

linmeon commented 1 year ago

你好,

代替,

pip install --upgrade --pre itk

请用:

pip install --upgrade --pre 'itkwidgets[lab]'

tks,but how to install early version? i want display polydata or geometries? pre version not support

linmeon commented 1 year ago

你好,

代替,

pip install --upgrade --pre itk

请用:

pip install --upgrade --pre 'itkwidgets[lab]'

i try many version ,get error on jupyter notebook [Open Browser Console for more detailed log - Double click to close this message] Model class 'ViewerModel' from module 'itkwidgets' is loaded but can not be instantiated TypeError: o._deserialize_state is not a function at u._make_model (http://localhost:8888/nbextensions/jupyter-js-widgets/extension.js?v=20221214105444:2:747339)