Kitware / ipyvtklink

🔗 minimalist ipywidget to interface with any Python vtkRenderWindow
Other
93 stars 13 forks source link

Widget: model not found when using jupyter notebook lab #32

Closed adam2392 closed 2 years ago

adam2392 commented 3 years ago

I'm currently using a Mac OSX and trying to plot some stuff that relies on ipyvtklink to render something in the notebook. This is an issue started in https://github.com/mne-tools/mne-python/issues/9393

I get this error where I'm getting a "model not found". Untitled.pdf

Unfortunately, I have no idea how to proceed further on diagnosing this error and was wondering if anyone might have some ideas?

GuillaumeFavelier commented 3 years ago

To facilitate the process, basic infos on @adam2392's configuration is available in https://github.com/mne-tools/mne-python/issues/9393#issuecomment-840757373.

Pasted here:

Platform:      Linux-5.5.4-050504-generic-x86_64-with-glibc2.10
Python:        3.8.3 (default, May 19 2020, 18:47:26)  [GCC 7.3.0]
Executable:    /home/adam2392/Documents/sickkids/.venv/bin/python3
CPU:           x86_64: 24 cores
Memory:        Unavailable (requires "psutil" package)
mne:           0.23.0
numpy:         1.20.2 {blas=openblas, lapack=openblas}
scipy:         1.6.2
matplotlib:    3.4.1 {backend=module://ipympl.backend_nbagg}

sklearn:       0.24.1
numba:         0.53.1
nibabel:       3.2.1
nilearn:       Not found
dipy:          Not found
cupy:          Not found
pandas:        1.2.4
mayavi:        Not found
pyvista:       0.30.1 {OpenGL 4.5.0 NVIDIA 460.73.01 via GeForce GTX 750/PCIe/SSE2}
vtk:           9.0.1
PyQt5:         5.15.4
None

@adam2392 could you also confirm that you reproduce the issue with a simple example like the one on the README.md ?

import vtk
from ipyvtklink.viewer import ViewInteractiveWidget

# Create some data
cylinder = vtk.vtkCylinderSource()
cylinder.SetResolution(8)
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(cylinder.GetOutputPort())
actor = vtk.vtkActor()
actor.SetMapper(mapper)

# Set up render window
ren = vtk.vtkRenderer()
ren_win = vtk.vtkRenderWindow()
ren_win.SetOffScreenRendering(1)
ren_win.SetSize(600, 600)
ren_win.AddRenderer(ren)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(ren_win)
style = vtk.vtkInteractorStyleTrackballCamera()
iren.SetInteractorStyle(style)

# Add actor to scene
ren.AddActor(actor)
ren.ResetCamera()

# Display
ViewInteractiveWidget(ren_win)
adam2392 commented 3 years ago

yep just tried and got the same thing :/

banesullivan commented 2 years ago

I'm hoping this issue resolved itself -- these errors tend to no longer be an issue (for me) in Jupyter Lab >=3

banesullivan commented 2 years ago

Closing due to inactivity -- @adam2392, ping me if you're still having an issue with this