Skip to content

ASR.fit error for import '_check_est' #84

Closed

Description

@MerlinK75

Hello
I am trying to fit the ASR class to my EEG data with the following code
asr = ASR(sfreq=self.srate, cutoff=20, method="euclid") train_idx = np.arange(time_range[0] * self.srate, time_range[1] * self.srate, dtype=int) asr.fit(filtered_eeg[:7, train_idx])

However, it is causing the error:
cannot import name '_check_est' from 'pyriemann.utils.covariance'

After looking at covariance.py there is no command 'import _check_est' present in the newest version, so how I fixed this was installing pyRiemann 0.3 instead of 0.7 which fixed the error. I believe the requirement.txt need to be updated to prevent this error or updating the code to adapt to the new changes present in the covariance.py file

Activity

  1. nbara commented on Jan 4, 2025

    @nbara
    Owner

    Thanks for flagging @MerlinK75 , you're right _check_est is not available in recent pyriemann. I'll update ASAP.

    If it's urgent, you're welcome to open a PR, the fix is super simple and I can help you out

  2. added
    bugSomething isn't working
    on Jan 4, 2025
  3. MerlinK75 commented on Jan 4, 2025

    @MerlinK75
    ContributorAuthor

    Hi nbara, no urgency here all i did was install the older version and it works fine. I can open a PR and just change the requirement.txt so everyone has version 0.3 as a quick fix for everyone until a better solution comes around

  4. linked a pull request that will close this issueUpdate requirements.txt #85on Jan 4, 2025
  5. linked a pull request that will close this issue[MAINT] Bump version #87on Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions