Error in reading a .vhdr file

  • MNE version: e.g. 1.0.0
  • operating system: e.g. Windows 10

Hello, I used to read my data before with the following line:
raw = mne.io.read_raw_brainvision(raw_fname+’.vhdr’, preload=True)
But right now I receive an error : TypeError: expected dtype object, got ‘numpy.dtype[float64]’

I can read my data with EEGLAB. When I use this line:
raw = mne.io.read_raw_eeglab(raw_fname+’.set’)
I receive this error :
RuntimeError: For EEGLAB I/O to work, the pymatreader module is needed, but it could not be imported.

If you could help me, that would be greatly appreciated.

Hello @rsaeed and welcome to the forum!

This first error message indicates that your NumPy version is out of date and you should update it.

The second suggests you need to install pymatreader

Best wishes,
Richard

Hello Richard,

Thank you for your response. My NumPy version is 1.22.3. But I still have the same error.

Best,
Reza

Maybe SciPy needs updating too?

Otherwise, I’d suggest to simply create a fresh installation with our installers or by following the official installation instructions.

Best wishes,
Richard

You need to install pymatreader.

Hello,

I uninstalled ANACONDA and reinstalled it. I then installed MNE and Pymatreader, and now everything works!

Best,
Reza