Problem when fitting an AutoReject object on epochs

Hello,

I’m using mne 1.6.0 and autoreject 0.4.3 on MacOS big sure 11.7.10

I followed the autoreject and ICA workflow example and I get an attribute error message that I don’t understand when fitting an AutoReject object on my epochs.

ar = autoreject.AutoReject(n_interpolate=[1, 2, 3, 4], random_state=11,
                        n_jobs=2, verbose=True)
ar.fit(epochs[:10]) 
AttributeError: No mne.io attribute meas_info

I searched in the doc what was this meas_info but I didn’t find anything. I also tried with different versions (mne 1.4, 1.5 and autoreject 1.3.0, 1.4.1, 1.4.2, 1.4.3) but with no success.

Hello @nissauce and welcome to the forum

Could you please share the entire traceback (the usually quite long list of error messages) you receive, not just the very last one?

Richard

Hello Richard, thanks!

Here it is:

Traceback (most recent call last):
  File "/path/to/proj/debug_autoreject.py", line 11, in <module>
    ar.fit(epochs[:10]) 
  File "/Users/nicolaspiron/opt/anaconda3/envs/pulsation_proj/lib/python3.8/site-packages/autoreject/autoreject.py", line 1004, in fit
    _check_data(epochs, picks=self.picks_, verbose=self.verbose)
  File "/Users/nicolaspiron/opt/anaconda3/envs/pulsation_proj/lib/python3.8/site-packages/autoreject/utils.py", line 42, in _check_data
    ch_types_picked = {
  File "/Users/nicolaspiron/opt/anaconda3/envs/pulsation_proj/lib/python3.8/site-packages/autoreject/utils.py", line 43, in <setcomp>
    mne.io.meas_info.channel_type(picked_info, idx)
  File "/Users/nicolaspiron/opt/anaconda3/envs/pulsation_proj/lib/python3.8/site-packages/lazy_loader/__init__.py", line 89, in __getattr__
    raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No mne.io attribute meas_info

Maybe @sappelhoff has an idea?

I think you need to upgrade your software versions of autoreject and mne to the latest available stable versions (not development, not old).

I did it (1.6.1 for mne, 0.4.2 for autoreject) and I get the same error.

You were right, autoreject 0.4.3 works, thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.