question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupyter notebook itkwidget error (not visible in notebook)

See original GitHub issue

This example does not work in Jupyter notebook, the itkwidget does not show up and in my case an error is printed: Error displaying widget: model not found

Code:

from vedo import embedWindow, show
import brainrender
from brainrender.scene import Scene

embedWindow('itkwidgets') 
brainrender.SHADER_STYLE = "cartoon"
scene = Scene(title="brain regions", inset=False)
scene.add_brain_region("TH", alpha=0.15)
val = scene.add_brain_region("VAL")
val.wireframe()scene.jupyter = True
scene.render()
from ipywidgets import VBox, Button
VBox([Button(description='hi'), show(*scene.renderables)])

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
nantillecommented, Dec 9, 2020

So I guess it was related to Jupyter lab more than anything else. Your code above works in Jupyter notebook. I see the brain in a basic UI (finally!).

0reactions
nantillecommented, Dec 9, 2020

Yes, we can close this issue for now. Thanks for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IPython Notebook ipywidgets does not show - Stack Overflow
No error messages appear. The code seem to run just fine, as the table appears, but the slide bar just doesn't appear. I...
Read more >
No outputs from view(image) of itkwidgets - ITK Discourse
When I run the following lines from the jupyter notebook provided as examples on github in my system, I fail to get any...
Read more >
Working with Jupyter Notebooks in Visual Studio Code
To select an environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P). Once the appropriate environment is activated, you ...
Read more >
Using itkwidgets with PyVista
PyVista has an interface for visualizing plots in Jupyter. The pyvista.PlotterITK class allows you interactively visualize a mesh within a jupyter notebook.
Read more >
itkwidgets - PyPI
JupyterLab 3 support is not yet available. JupyterLab 2 or the Jupyter Notebook are possible alternatives. Usage. In Jupyter, import the view function:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found