[Mne_analysis] TypeError: string indices must be integers
Renew Andrade
andraderenew at yahoo.com
Fri May 1 12:54:43 EDT 2020
External Email - Use Caution
Dear experts:
I am running this code.
# Get labels for FreeSurfer 'aparc' cortical parcellation with 34 labels/hemi
labels_parc = mne.read_labels_from_annot(
subject, parc='aparc', subjects_dir=subjects_dir)
label_ts = mne.extract_label_time_course(
[stc],labels_parc, src, mode='mean', allow_empty=True)
And I get this error message. I know there is some issues with the numbers but I am using the code from the tutorial so I don’t know why it doesn’t work probably because is my own data.
Traceback (most recent call last):
File "script.py", line 106, in <module>
[stc],labels_parc, src, mode='mean', allow_empty=True)
File "<decorator-gen-239>", line 21, in extract_label_time_course
File "/home/andraderenew/anaconda3/lib/python3.7/site-packages/mne/source_estimate.py", line 2861, in extract_label_time_course
label_tc = list(label_tc)
File "/home/andraderenew/anaconda3/lib/python3.7/site-packages/mne/source_estimate.py", line 2750, in _gen_extract_label_time_course
if src[0]['type'] != 'surf' or src[1]['type'] != 'surf':
TypeError: string indices must be integers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200501/ebf8641b/attachment-0001.html
More information about the Mne_analysis
mailing list