Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError due to nilearn API change (nilearn>=0.10.3) #33

Open
Hyedryn opened this issue Feb 26, 2024 · 0 comments · May be fixed by #35
Open

ImportError due to nilearn API change (nilearn>=0.10.3) #33

Hyedryn opened this issue Feb 26, 2024 · 0 comments · May be fixed by #35

Comments

@Hyedryn
Copy link
Collaborator

Hyedryn commented Feb 26, 2024

When attempting to use giga_auto_qc, an ImportError is raised during the initialization phase. This issue is encountered when running the --help command or any other functionality provided by the tool. The error log is as follows:

Traceback (most recent call last): File "/home/qdessain/ukbb_scripts/giga_auto_qc/venv_autoqc/bin/giga_auto_qc", line 5, in <module> from giga_auto_qc.run import main File "/home/qdessain/ukbb_scripts/giga_auto_qc/venv_autoqc/lib/python3.10/site-packages/giga_auto_qc/run.py", line 4, in <module> from giga_auto_qc.workflow import workflow File "/home/qdessain/ukbb_scripts/giga_auto_qc/venv_autoqc/lib/python3.10/site-packages/giga_auto_qc/workflow.py", line 4, in <module> from giga_auto_qc import assessments, utils File "/home/qdessain/ukbb_scripts/giga_auto_qc/venv_autoqc/lib/python3.10/site-packages/giga_auto_qc/assessments.py", line 11, in <module> from nilearn.masking import intersect_masks, _load_mask_img ImportError: cannot import name '_load_mask_img' from 'nilearn.masking' (/home/qdessain/ukbb_scripts/giga_auto_qc/venv_autoqc/lib/python3.10/site-packages/nilearn/masking.py)

This issue seems to be caused by an api change in nilearn>0.10.2, where some functions prefixed with an underscore had their leading underscores removed. Downgrading to nilearn 0.10.2 resolves the issue.

Environment:

  • giga_auto_qc version: 0.3.4
  • Python version: 3.10.2
  • nilearn version: 0.10.3
@htwangtw htwangtw linked a pull request Apr 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant