Assertion error when running mne.io.read_raw_brainvision

Hi,

I'm trying to open a vhdr file in Python. When I do

raw = mne.io.read_raw_brainvision(<filename>)

I get this error:
Traceback (most recent call last):
  File "/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py",
line 3035, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-1ae38f69fbbe>", line 1, in <module>
    mne.io.read_raw_brainvision(filename)
  File "/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mne/io/brainvision/brainvision.py",
line 624, in read_raw_brainvision
    preload=preload, verbose=verbose)
  File "<string>", line 2, in __init__
  File "/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mne/utils.py",
line 541, in verbose
    return function(*args, **kwargs)
  File "/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mne/io/brainvision/brainvision.py",
line 80, in __init__
    info, self._eeg_info, events = _get_eeg_info(vhdr_fname, eog, misc)
  File "/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mne/io/brainvision/brainvision.py",
line 406, in _get_eeg_info
    assert l == 'Brain Vision Data Exchange Header File Version 1.0'
AssertionError

How can I debug this? I think there's nothing wrong with the vhdr file
itself because I have been able to load it and process it in Matlab.

Thanks,

Gladia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160422/eaeec29f/attachment.html

I believe this issue has been fixed in latest master, can you give it a try?

Eric

Hi Eric,

Do I get the latest version by running $ pip install mne ?upgrade in
python? I did this in pycharm and I got 'invalid syntax'.

Best,
Gladia

hi,

as explained on the readme [1] you need to do:

"
for the latest development version (the most up to date):

pip install -e git+https://github.com/mne-tools/mne-python#egg=mne-dev --user
"

in a terminal.

Do not type it in the python interpreter of pycharm but in a console/terminal.

HTH
Alex

[1] https://github.com/mne-tools/mne-python