Getting error "LPA should have the shape (3, ) instead of (4, )" when loading in .snirf file with MNE/python, unable to load in data

  • MNE-Python version: 0.23.4
  • operating system: MAC OSX

For a project using fNIRS, I have a lot of .snirf data files that I’d like to load in using MNE. Files pertaining to a data collection a year ago load in jut fine, and I can - following the MNE tutorial - even plot and access the data. However, we are conducting a new round of data collection this fall and I get the following error, when loading in a .snirf file, which renders me unable to access the data as of now using MNE: (see picture)

The code I’ve used so far is e.g. this line:

# Importing a package

import mne

import mne_nirs

# get path for just the first participant

fname = "/Users/pernillebrams/Desktop/MNE_30sep/026/2020-12-07/2020-12-07_001/2020-12-07_001.snirf"

raw_intensity =, verbose = True, preload = True) # Works with file from last year, not with this file from this year

# View data

raw_intensity # here is the data put into, a variable

To try and isolate where the problem lies:

  • The same montage file from NIRSite is being used as last year
  • The same software, Aurora, is being used as last year. However it was updated to version 2021 in the process.
  • The device setup is the same with 4x8 channels, 4 x 8 detectors, distributed over 16x16 devices.

Have any of you seen this error before and do you have any advice in regards to how I can fix this or locate the issue?
Have so far used jupyter notebook. Not sure if relevant.

Hello @PernilleBrams and welcome to the forum! I’ll tag @rob-luke, our fNIRS expert :sunglasses::ok_hand:

1 Like

Hi @PernilleBrams,

Thanks for using MNE and taking the time to report your issue. Your description is clear, and I think you’ve guessed at the cause of your issue correctly.

NIRx slightly changed their file format with Aurora 2021.9. But no problem, I think we already fixed this here : MRG: FIX: Specify exact array indicies for 3D landmark positions by rob-luke · Pull Request #9777 · mne-tools/mne-python · GitHub

You will need to update to the development version of MNE to use this fix. Or wait a month or so and there should be a new release (is this true @richard ?). Here is the instructions to use the dev version : Updating MNE-Python — MNE 0.24.dev0 documentation

Please let us know if this fixes your problem or not.


1 Like

Yes, we’re aiming to have a new MNE-Python release within the next couple of weeks!


Hi both,

Thanks so much for such informative answers and extensive guide - this is great! I’ll get back to you ASAP when I’ve tried your suggestions out ^^


1 Like