NeuroTechX / moabb

Mother of All BCI Benchmarks
https://neurotechx.github.io/moabb/
BSD 3-Clause "New" or "Revised" License
646 stars 168 forks source link

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

Open Paulhb7 opened 2 months ago

Paulhb7 commented 2 months ago

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 commented 2 months ago

Works using mne==1.6.1

bruAristimunha commented 2 months ago

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.