mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.7k stars 1.31k forks source link

Q: read_raw_brainvision IndexError #1190

Closed GMael closed 10 years ago

GMael commented 10 years ago

Hello,

I'm just starting to learn about Python and I try to use MNE especially with Brainvision Raw Data I encounter a problem during the call of "read_raw_brainvision" in the script below

import mne from mne.fiff import brainvision

vdhr_fname = '10-MD10/MD10_EEG/MD10/MD10.vhdr' raw = brainvision.read_raw_brainvision(vdhr_fname, elp_fname=None, ch_names=None, preload=False, verbose=None)

and here my output error :

Extracting eeg Parameters from 10-MD10/MD10_EEG/MD10/MD10.vhdr... Setting channel info structure... Traceback (most recent call last): File "selection.py", line 9, in ch_names=None, preload=False, verbose=None) File "/usr/local/lib/python2.7/dist-packages/mne/src/mne/mne/fiff/brainvision/brainvision.py", line 682, in read_raw_brainvision reference, eog, ch_names, verbose) File "", line 2, in init File "/usr/local/lib/python2.7/dist-packages/mne/src/mne/mne/utils.py", line 392, in verbose ret = function(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/mne/src/mne/mne/fiff/brainvision/brainvision.py", line 84, in init reference, eog) File "/usr/local/lib/python2.7/dist-packages/mne/src/mne/mne/fiff/brainvision/brainvision.py", line 639, in _get_eeg_info events = _read_vmrk_events(eeg_info['marker_id']) File "/usr/local/lib/python2.7/dist-packages/mne/src/mne/mne/fiff/brainvision/brainvision.py", line 321, in _read_vmrk_events trigger = int(re.findall('S\s?(\d+)', mdesc)[0]) IndexError: list index out of range

Exit code: 1

MD10.vhdr, MD10.eeg and MD10.vmrk are in the same directory you can download it ( http://we.tl/j3N4U9bbox )

What could be the origins of this kind of error ? I'm sure the solution should be obvious but i don't succeed to find it.

I hope that my explanations are clear. Thank you in advance for your help,

Best regards, Maël Garnotel

teonbrooks commented 10 years ago

Hi Mael. I managed to solve the error that was raised. it has to go through the approval process but you can follow it here #1191.

agramfort commented 10 years ago

fixed by #1191