No functional data and sulcus are displayed in SourceEstimate Result

Hi there,
I am having a problem when running the tutorial code of source localization that no sulcus and functional data of the inflated brain are displayed, and I dont know what leaded to this situation… Maybe some supported python module is still not installed or applied ? Thanks for your help !

  • MNE version:1.1.0
  • operating system: Windows 11

Here is the code:

from mne import read_source_estimate
from mne.datasets import sample
import turtle


# Paths to example data
sample_dir_raw = sample.data_path()
sample_dir = sample_dir_raw / 'MEG' / 'sample'
subjects_dir = sample_dir_raw / 'subjects'

fname_stc = sample_dir / 'sample_audvis-meg'
stc = read_source_estimate(fname_stc, subject='sample')

# Define plotting parameters
surfer_kwargs = dict(
    hemi='lh', subjects_dir=subjects_dir,
    clim=dict(kind='value', lims=[8, 12, 15]), views='lateral',
    initial_time=0.09, time_unit='s', size=(800, 800),

# Plot surface
brain = stc.plot(**surfer_kwargs)

# Add title
brain.add_text(0.1, 0.9, 'SourceEstimate', 'title', font_size=16)


mne.sys_info() :

Platform:         Windows-10-10.0.22000-SP0
Python:           3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
Executable:       E:\Py3.9\python.exe
CPU:              Intel64 Family 6 Model 165 Stepping 5, GenuineIntel: 20 cores
Memory:           63.8 GB

mne:              1.1.1
numpy:            1.23.1 {}
scipy:            1.8.1
matplotlib:       3.5.2 {backend=QtAgg}

sklearn:          1.1.1
numba:            Not found
nibabel:          4.0.1
nilearn:          0.9.1
dipy:             Not found
cupy:             Not found
pandas:           1.4.3
pyvista:          0.35.2 {OpenGL 4.5.0 NVIDIA 512.52 via NVIDIA GeForce GTX 1660 SUPER/PCIe/SSE2}
pyvistaqt:        0.9.0
ipyvtklink:       Not found
vtk:              9.1.0
qtpy:             2.1.0 {PyQt5=5.15.2}
ipympl:           Not found
pyqtgraph:        Not found
pooch:            v1.6.0

mne_bids:         Not found
mne_nirs:         Not found
mne_features:     Not found
mne_qt_browser:   Not found
mne_connectivity: Not found
mne_icalabel:     Not found

The Result:

Hello @Sebastian and welcome to the forum!

For me (on macOS) everything works correctly as long as I remove the call to turtule.done(), as it crashes my interactive Python session. Maybe your problem is related to this? Can you try commenting out all turtle-related stuff?

I’m also realizing you apparently installed MNE-Python in a “custom” way. You should try to follow our official installation instructions or use our standalone installers for best results, as MNE has so many dependencies that it’s difficult to ensure they all work smoothly together.

Best wishes,

Hello Richard,
Thanks for your light-speed reply.
For the first part you replied, The result window will flash and disappear without the turtle-related things( I am working on the PyCharm IDE), I dont know wether there are any methods to avoid the turtle problem?
For the second part, I installed MNE-Python in a very simple way that just " pip install mne" in the Windows cmd long time before , even not in a conda virtual enviroment,when I was completely unfamiliar with this Analysis Tool and Python language. I will try your recommendation on my Windows system.
Finally, I tried the same code on my VirtualBox linux Ubuntu 18.04 system just now, where I used a conda virtual enviroment and installed as MNE-Python offical instructions, it turns out good.

Thanks for your help and I will reinstall MNE in official installation way.
Best wishes,

1 Like

The all-white brain is probably caused by this:

Our current install-spec for pyvista is pyvista>=0.32,!=0.35.2 (in other words, 0.35.2 is known to be broken in exactly this way)