MNEpy stc to label

Hi all,
I am trying to use `mne.stc_to_label` to generate the freesurfer label for
connected non-zero vertices. When I pass the `connected=True` argument I
receive an index error i.e., "index 4098 is out of bounds for axis 0 with
size 4098" at ln 667 of label.py. I am using an oct-6 surface source space
with c. 10000 vertices of which 4098 are in use.

However, when I pass `connected=False` the list of labels is returned. Can
someone tell me why this occurs? and how to get the list of connected
labels?

regards,
Kam

hi Kam,

can you reproduce this on the sample dataset?

if not can you share a minimum set of files to reproduce the problem?

Alex