mne.channels.read_custom_montage using standard-10-5-cap385.elp

Hi everyone

I know this question was asked before but the answer didn’t help me. A few months ago I used the code:

eeglab_montage = "Z:/Users.../channellocation/standard-10-5-cap385.elp"
montage = mne.channels.read_custom_montage(eeglab_montage)

in my script to load the montage file and it worked without any problems. I tried to use the same code again now and got the following error:

Traceback (most recent call last):
  File "...\miniconda3\envs\hypyp\lib\site-packages\numpy\lib\npyio.py", line 979, in _read
    arr = _load_from_filelike(
ValueError: the number of columns changed from 5 to 1 at row 1; use `usecols` to select a subset and avoid this error

I am not sure what changed between few months ago and now, it is the same code and should have worked…
Does anyone know why it happened and how to fix this error?

Thanks a lot!

It would be helpful if you could link to the question+answer that didn’t help you.

Have you updated your packages in the meantime?


Another idea that I have is, that apparently .elp files can be by BESA or Polhemus

Have you tried these two functions?

And have you taken a look at this page?

Hello @CarmelGashri, you could also try to simply use one of MNE’s built-in template montages:

https://mne.tools/stable/auto_tutorials/intro/40_sensor_locations.html#working-with-built-in-montages