Crash stc.plot() after mne update

Hi all, now I am using:

  • MNE version: 0.24.0
  • OS: Linux-5.4.0-77-generic-x86_64-with-debian-bullseye-sid
    I recently updated the package mne to version 0.22.10 to 0.24.0 and now I am getting the error, when i try to run stc.plot():

AttributeError: ‘vtkmodules.vtkRenderingUI.vtkGenericRenderWindowIn’ object has no attribute ‘initialize’

What could be the cause of the error?

list environment packages

Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
Platform: Linux-5.4.0-77-generic-x86_64-with-debian-bullseye-sid
Python: 3.7.10 (default, Feb 26 2021, 18:47:35) [GCC 7.3.0]
Executable: /opt/anaconda3/envs/py37/bin/python
CPU: x86_64: 32 cores
Memory: 125.9 GB

mne: 0.24.0
numpy: 1.20.2 {blas=NO_ATLAS_INFO, lapack=lapack}
scipy: 1.6.2
matplotlib: 3.3.4 {backend=Qt5Agg}

sklearn: 0.24.1
numba: 0.53.1
nibabel: 3.2.1
nilearn: 0.7.1
dipy: 1.4.0
cupy: Not found
pandas: 1.2.3
mayavi: 4.7.2
pyvista: 0.29.0 {OpenGL 3.3 (Core Profile) Mesa 20.0.8 via llvmpipe (LLVM 10.0.0, 256 bits)}
pyvistaqt: 0.3.0
ipyvtklink: Not found

full bug report

Using control points [ 4.11800842 5.04983401 13.54983059]
Traceback (most recent call last):

File “”, line 1, in

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/”, line 666, in plot

File “”, line 24, in plot_source_estimates

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/viz/”, line 1879, in plot_source_estimates
brain_kwargs=brain_kwargs, **kwargs)

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/viz/”, line 1955, in _plot_stc
brain = Brain(**kwargs)

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/viz/_brain/”, line 531, in init

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/viz/backends/”, line 41, in _get_renderer
return backend._Renderer(*args, **kwargs)

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/viz/backends/”, line 648, in init
super().init(*args, **kwargs)

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/viz/backends/”, line 187, in init
self.plotter =

File “/opt/anaconda3/envs/py37/lib/python3.7/site-packages/mne/viz/backends/”, line 105, in build

AttributeError: ‘vtkmodules.vtkRenderingUI.vtkGenericRenderWindowIn’ object has no attribute ‘initialize’

Hello @Kirill, your PyVista and pyvistaqt are outdated.

We recommend to create a new environment from scratch when updating MNE-Python, to ensure one has the correct versions of all dependencies.

Best wishes,

1 Like