TypeError: string indices must be integers

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

External Email - Use Caution

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.

If you are looking at an example on the dev website, then you need to be
using the latest dev / master version of MNE-Python. Only examples from the
stable (0.20 currently) website are guaranteed to work with 0.20.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200501/b2ca11c5/attachment.html

External Email - Use Caution

Ok thank you very much!! May be that is it I will try and check!!