Ipyvtk_simple is not ipyvtk_link in 3D notebook viewer
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- jupyter, python
- Domain
- data-visualization
Research direction
Start with mne/viz/backends/_notebook.py and the plot_ecog.py example, then trace renderer.show() into PyVista’s notebook path. Reproduce with set_3d_backend("notebook") and verify that the backend handles the current ipyvtk package name and the example opens without ImportError.
Written by the indexing model from the issue text.
Description
Describe the bug
I am attempting to use the 3D backend notebook viewer for plotting an ecog brain. I get the following error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~/Documents/sickkids/.venv/lib/python3.8/site-packages/pyvista/plotting/plotting.py in show(self, title, window_size, interactive, auto_close, interactive_update, full_screen, screenshot, return_img, cpos, use_ipyvtk, **kwargs)
4323 try:
-> 4324 from ipyvtk_simple.viewer import ViewInteractiveWidget
4325 except ImportError:
ModuleNotFoundError: No module named 'ipyvtk_simple'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-20-ea5cd7c5fb7d> in <module>
----> 1 fig = plot_alignment(
2 raw.info,
3 subject="E1",
4 subjects_dir=subjects_dir,
5 surfaces=["pial"],
<decorator-gen-151> in plot_alignment(info, trans, subject, subjects_dir, surfaces, coord_frame, meg, eeg, fwd, dig, ecog, src, mri_fiducials, bem, seeg, fnirs, show_axes, dbs, fig, interaction, verbose)
~/Documents/sickkids/.venv/lib/python3.8/site-packages/mne/viz/_3d.py in plot_alignment(***failed resolving arguments***)
1098 renderer.set_camera(azimuth=90, elevation=90,
1099 distance=0.6, focalpoint=(0., 0., 0.))
-> 1100 renderer.show()
1101 return renderer.scene()
1102
~/Documents/sickkids/.venv/lib/python3.8/site-packages/mne/viz/backends/_notebook.py in show(self)
360 # viewer
361 if LooseVersion(pyvista.__version__) < LooseVersion('0.30'):
--> 362 viewer = self.plotter.show(
363 use_ipyvtk=True, return_viewer=True)
364 else: # pyvista>=0.30.0
~/Documents/sickkids/.venv/lib/python3.8/site-packages/pyvista/plotting/plotting.py in show(self, title, window_size, interactive, auto_close, interactive_update, full_screen, screenshot, return_img, cpos, use_ipyvtk, **kwargs)
4324 from ipyvtk_simple.viewer import ViewInteractiveWidget
4325 except ImportError:
-> 4326 raise ImportError('Please install `ipyvtk_simple` to use this feature:'
4327 '\thttps://github.com/Kitware/ipyvtk-simple')
4328 # Have to leave the Plotter open for the widget to use
ImportError: Please install `ipyvtk_simple` to use this feature: https://github.com/Kitware/ipyvtk-simple
However, this is because ipyvtk_simple is now named... ipyvtk-link :(
Steps to reproduce
Set mne.viz.set_3d_backend("notebook") and then run plot_ecog.py example.
Additional information
Platform: macOS-10.16-x86_64-i386-64bit
Python: 3.8.6 | packaged by conda-forge | (default, Jan 25 2021, 23:22:12) [Clang 11.0.1 ]
Executable: /Users/adam2392/Documents/sickkids/.venv/bin/python
CPU: i386: 8 cores
Memory: Unavailable (requires "psutil" package)
mne: 0.24.dev0
numpy: 1.20.1 {blas=openblas, lapack=openblas}
scipy: 1.6.0
matplotlib: 3.3.4 {backend=agg}
sklearn: 0.24.1
numba: 0.52.0
nibabel: 3.2.1
nilearn: Not found
dipy: Not found
cupy: Not found
pandas: 1.2.2
mayavi: Not found
pyvista: 0.28.1 {pyvistaqt=0.4.0, OpenGL 4.1 ATI-4.4.17 via AMD Radeon Pro 560 OpenGL Engine}
vtk: 9.0.1
PyQt5: 5.15.2
Also ran w/ mne==0.23
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mne-tools/mne-python
-
ENH
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mne-tools/mne-python#13743 · 2 comments ·
-
ENH
Difficulty 3/5 1-2 days Newbie friendliness 68/100
mne-tools/mne-python#14318 ·
-
BUG
Difficulty 3/5 1-2 days Newbie friendliness 68/100
mne-tools/mne-python#14317 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
mne-tools/mne-python#14311 · 1 comment · 1 reaction ·
-
ENH
Difficulty 5/5 Over a week Newbie friendliness 35/100
mne-tools/mne-python#14309 · 1 comment ·
All issues in mne-tools/mne-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100