Issue with stc.plot

I have rather small piece of code, which is given below

my_label='V1'
subject_meg ='on_stim05_p'
date = subject_first_session(subject_meg)
file='rest1'   
subjects_dir = "/network/lustre/iss02/lubetzki-stankoff/clinic/ONSTIM/data/freesurfer"
stcs = epochs_stc_compute(subject_meg, date, file)  
stc=stcs[0]
initial_time = 0.1
brain = stc.plot(subjects_dir=subjects_dir, initial_time=initial_time,
                 clim=dict(kind='value', lims=[3, 6, 9]))

However, upon running the code, i get following error and kernel restarts

Using pyvistaqt 3d backend.


ask was destroyed but it is pending!\ntask: <Task pending name='Task-2' coro=<Kernel.poll_control_queue() running at /network/lustre/iss01/apps/lang/anaconda/3/2023.03/mne/1.3.0/lib/python3.10/site-packages/ipykernel/kernelbase.py:279> wait_for=<Future finished result=<Future at 0x...state=pending>> cb=[_chain_future.<locals>._call_set_state() at /network/lustre/iss01/apps/lang/anaconda/3/2023.03/mne/1.3.0/lib/python3.10/asyncio/futures.py:392]>\n"

Fatal Python error: Segmentation fault

MNE version = 1.3.0
Python version = 3.10.8

Any lead to sort out this problem will be appreciated
Thanks

This could be an issue with the 3D graphics driver. /network/lustre… are you running this on a cluster?

Hi

Yes, i am working on a cluster. In that case, how can i get this issue resolved ?

Thanks

Clusters are not made for interactive 3d graphics. I would really do the plotting on a local workstation or laptop. With effort, you might be able to get something working on the cluster, but it will never be a good user experience. If there’s any possibility of doing to heavy computations on the cluster, save the files, and then load the files on a local machine with a GPU and use that for plotting, things are likely to work much bette.