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

OSError: No command "N4BiasFieldCorrection" found. #1384

Open
pradhanhitesh opened this issue Mar 11, 2025 · 1 comment
Open

OSError: No command "N4BiasFieldCorrection" found. #1384

pradhanhitesh opened this issue Mar 11, 2025 · 1 comment
Labels

Comments

@pradhanhitesh
Copy link

What happened?

I am running mriqc==24.0.2 on python==3.11.4.

When running the command mriqc /path/to/bids/folder /path/to/output/folder participant, I am getting the error OSError: No command "N4BiasFieldCorrection" found on host jonaslab. Please check that the corresponding package is installed. However, I have installed all necessary dependencies such as AFNI, ANTS and Freesurfer.

What command did you use?

mriqc /path/to/bids/folder /path/to/output/folder participant

What version of the software are you running?

24.0.2

How are you running this software?

Local installation ("bare-metal")

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

Node: mriqc_wf.anatMRIQC.synthstrip_wf.pre_n4
Working directory: /media/hitesh/G/Models/Test/work/mriqc_wf/anatMRIQC/synthstrip_wf/2d1ac500ddb38599d0be580e6c4e262170261a96/pre_n4

Node inputs:

args = <undefined>
bias_image = <undefined>
bspline_fitting_distance = <undefined>
bspline_order = <undefined>
convergence_threshold = <undefined>
copy_header = True
dimension = 3
environ = {'NSLOTS': '48'}
histogram_sharpening = <undefined>
input_image = /media/hitesh/G/Models/Test/work/mriqc_wf/anatMRIQC/synthstrip_wf/2d1ac500ddb38599d0be580e6c4e262170261a96/pre_clip/clipped.nii.gz
mask_image = <undefined>
n_iterations = <undefined>
num_threads = 48
output_image = <undefined>
rescale_intensities = True
save_bias = False
shrink_factor = <undefined>
weight_image = <undefined>

Traceback (most recent call last):
  File "/media/hitesh/G/Models/Test/mriqc_env/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 64, in run_node
    result['result'] = node.run(updatehash=updatehash)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/hitesh/G/Models/Test/mriqc_env/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/hitesh/G/Models/Test/mriqc_env/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/hitesh/G/Models/Test/mriqc_env/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node pre_n4.

Cmdline:
	N4BiasFieldCorrection -d 3 --input-image /media/hitesh/G/Models/Test/work/mriqc_wf/anatMRIQC/synthstrip_wf/2d1ac500ddb38599d0be580e6c4e262170261a96/pre_clip/clipped.nii.gz --output clipped_corrected.nii.gz -r
Stdout:

Stderr:

Traceback:
	Traceback (most recent call last):
	  File "/media/hitesh/G/Models/Test/mriqc_env/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 401, in run
	    runtime = self._run_interface(runtime)
	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/media/hitesh/G/Models/Test/mriqc_env/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 756, in _run_interface
	    raise OSError(
	OSError: No command "N4BiasFieldCorrection" found on host jonaslab. Please check that the corresponding package is installed.

Additional information / screenshots

No response

@effigies
Copy link
Member

In the same environment that you're calling mriqc, can you call N4BiasFieldCorrection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants