Hi,
I am trying to reproduce this analysis pipeline on ds000248 from openneuro.org. I am now running this on a headless server, using slurm.
I get the following error message (copying only the relevant bit from the output):
[2022-11-03 11:21:32] │ ⏳️ report/_01_make_reports sub-01 Rendering sensor alignment (coregistration).
/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/pyvista/plotting/renderer.py:463: UserWarning: VTK compiled with OSMesa does not properly support anti-aliasing and anti-aliasing will not be enabled.
warnings.warn(
/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/pyvista/plotting/renderer.py:463: UserWarning: VTK compiled with OSMesa does not properly support anti-aliasing and anti-aliasing will not be enabled.
warnings.warn(
/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/pyvista/plotting/renderer.py:463: UserWarning: VTK compiled with OSMesa does not properly support anti-aliasing and anti-aliasing will not be enabled.
warnings.warn(
/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/pyvista/plotting/plotting.py:5511: UserWarning: Not within a jupyter notebook environment.
Ignoring ``jupyter_backend``.
warnings.warn(
[2022-11-03 11:21:36] │ ⏳️ report/_01_make_reports sub-01 A critical error occurred. The error message was: 'NoneType' object has no attribute 'layout'
Aborting pipeline run. The full traceback is:
Traceback (most recent call last):
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/report/report.py", line 441, in _iterate_trans_views
return _itv(
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/report/report.py", line 453, in _itv
function(fig=fig, **kwargs)
File "<decorator-gen-121>", line 12, in plot_alignment
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/viz/_3d.py", line 742, in plot_alignment
_, _, head_surf = _plot_head_surface(
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/viz/_3d.py", line 941, in _plot_head_surface
src_surf = _get_head_surface(head, subject, subjects_dir, bem=bem)
File "<decorator-gen-89>", line 12, in _get_head_surface
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/_freesurfer.py", line 726, in _get_head_surface
raise IOError('No head surface found for subject '
OSError: No head surface found for subject sub-01 after trying:
/imaging/davis/Projects/Openneuro_datasets/ds000248/derivatives/freesurfer/subjects/sub-01/bem/sub-01-head-dense.fif
/imaging/davis/Projects/Openneuro_datasets/ds000248/derivatives/freesurfer/subjects/sub-01/surf/lh.seghead
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne_bids_pipeline/_run.py", line 62, in wrapper
out = memory.cache(func)(*args, **kwargs)
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne_bids_pipeline/_run.py", line 157, in wrapper
func(*args, **kwargs)
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne_bids_pipeline/scripts/report/_01_make_reports.py", line 1194, in run_report
report = run_report_source(**kwargs)
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne_bids_pipeline/scripts/report/_01_make_reports.py", line 1123, in run_report_source
report.add_trans(
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/report/report.py", line 1288, in add_trans
self._add_trans(
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/report/report.py", line 3570, in _add_trans
img, caption = _iterate_trans_views(
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/report/report.py", line 445, in _iterate_trans_views
return _itv(function, fig, surfaces={'head': alpha}, **kwargs)
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/report/report.py", line 453, in _itv
function(fig=fig, **kwargs)
File "<decorator-gen-121>", line 12, in plot_alignment
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/viz/_3d.py", line 827, in plot_alignment
renderer.show()
File "/home/ma09/.conda/envs/mne_compute_node/lib/python3.8/site-packages/mne/viz/backends/_notebook.py", line 1453, in show
viewer.layout.width = None # unlock the fixed layout
AttributeError: 'NoneType' object has no attribute 'layout'
HBox(children=(Text(value='', layout=Layout(margin='2px 0px 2px 0px', min_width='0px'), placeholder='Type a file name'), Button(icon='camera', layout=Layout(margin='2px 0px 2px 0px', min_width='0px'), style=ButtonStyle(), tooltip='Take a screenshot')))
The error seems to stem from a missing head surface file, which is confusing as I was able to reproduce this analysis without an error, based on the same BIDS repository on a normal server (i.e., with graphical interface using vncserver and TurboVNC Viewer).
Could anyone please help me solving this issue?
Many thanks,
Máté
Technical details:
I prepared my conda environment according to these instructions. MESA was set up on our system according to these instructions.
System info:
Platform: Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.10
Python: 3.8.0 | packaged by conda-forge | (default, Nov 22 2019, 19:11:38) [GCC 7.3.0]
Executable: /home/ma09/.conda/envs/mne_compute_node/bin/python
CPU: x86_64: 20 cores
Memory: 251.7 GB
mne: 1.2.1
numpy: 1.23.4 {OpenBLAS 0.3.21 with 20 threads}
scipy: 1.9.3
matplotlib: 3.6.0 {backend=agg}
sklearn: 1.1.3
numba: Not found
nibabel: 4.0.2
nilearn: 0.9.2
dipy: Not found
openmeeg: Not found
cupy: Not found
pandas: 1.5.1
pyvista: 0.36.1 {OpenGL 3.3 (Core Profile) Mesa 18.3.1 via llvmpipe (LLVM 7.0, 256 bits)}
pyvistaqt: 0.9.0
ipyvtklink: 0.2.2
vtk: 9.0.0
qtpy: 2.1.0 {None=None}
ipympl: 0.9.2
pyqtgraph: Not found
pooch: v1.6.0
mne_bids: 0.11.1
mne_nirs: Not found
mne_features: Not found
mne_qt_browser: Not found
mne_connectivity: Not found
mne_icalabel: Not found