moabb icon indicating copy to clipboard operation
moabb copied to clipboard

Import Error : Missing 'pick_types' Function from mne.io.pick Module

Open Paulhb7 opened this issue 1 year ago • 2 comments
trafficstars

When attempting to import moabb in a Python environment, I encountered an ImportError related to the mne package. Specifically, the error arises because the pick_types function cannot be imported from mne.io.pick. This issue occurred during the execution of the mne_bids module, which attempts to import pick_types, as shown in the traceback below:

`--------------------------------------------------------------------------- ImportError Traceback (most recent call last) in <cell line: 1>() ----> 1 import moabb

13 frames /usr/local/lib/python3.10/dist-packages/mne_bids/utils.py in 17 from mne.channels import make_standard_montage 18 from mne.io.kit.kit import get_kit_info ---> 19 from mne.io.pick import pick_types 20 from mne.utils import warn as _warn, logger, verbose 21

ImportError: cannot import name 'pick_types' from 'mne.io.pick' (/usr/local/lib/python3.10/dist-packages/mne/io/pick.py)

---------------------------------------------------------------------------`

Paulhb7 avatar Apr 29 '24 09:04 Paulhb7

Works using mne==1.6.1

Paulhb7 avatar Apr 29 '24 10:04 Paulhb7

Hi @Paulhb7,

Thank you for reporting this issue. Looks like this is related to mne_bids, they solved it here: https://github.com/mne-tools/mne-bids/pull/1165.

We will upgrade the moabb dependencies soon with a new version.

I asked Bruna (@brunaafl) to take a look and see if it doesn't affect another place in our code. I'm almost sure it affects.

bruAristimunha avatar Apr 29 '24 12:04 bruAristimunha