ValueError: Field of view of image #6 is different from reference FOV

Hi,

The fitlins can’t treat reference shape (57, 68, 43) and image shape (57, 68, 43, 1) correctly.
I got the following messages.

Any suggestion?

200924-00:30:32,776 nipype.workflow WARNING:
Storing result file without outputs
200924-00:30:32,780 nipype.workflow WARNING:
[Node] Error on “_l2_model0” (/tmp/tmpircjz52a/fitlins_wf/l2_model/mapflow/_l2_model0)
200924-00:30:32,784 nipype.workflow WARNING:
Storing result file without outputs
200924-00:30:32,787 nipype.workflow WARNING:
[Node] Error on “fitlins_wf.l2_model” (/tmp/tmpircjz52a/fitlins_wf/l2_model)
200924-00:31:17,378 nipype.workflow ERROR:
Node l2_model failed to run on host 79b3412349f8.
200924-00:31:17,378 nipype.workflow ERROR:
Saving crash info to /work/crash-20200924-003117-neuro-l2_model-4d50a1fc-73ab-468f-88c9-d0a1f5f3f94c.txt
Traceback (most recent call last):
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py”, line 148, in init
mp_context=mp_context,
TypeError: init() got an unexpected keyword argument ‘initializer’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py”, line 67, in run_node
result[“result”] = node.run(updatehash=updatehash)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 516, in run
result = self._run_interface(execute=True)
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 1386, in _run_interface
self.config[“execution”][“stop_on_first_crash”]
File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 1295, in _collate_results
“Subnodes of node: %s failed:\n%s” % (self.name, “\n”.join(msg))
Exception: Subnodes of node: l2_model failed:
Subnode 0 failed
Error: Traceback (most recent call last):

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py”, line 148, in init
mp_context=mp_context,

TypeError: init() got an unexpected keyword argument ‘initializer’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/utils.py”, line 94, in nodelist_runner
result = node.run(updatehash=updatehash)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 516, in run
result = self._run_interface(execute=True)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 635, in _run_interface
return self._run_command(execute)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 741, in _run_command
result = self._interface.run(cwd=outdir)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nipype/interfaces/base/core.py”, line 397, in run
runtime = self._run_interface(runtime)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/fitlins/interfaces/nistats.py”, line 370, in _run_interface
output_type=‘all’

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nistats/second_level_model.py”, line 483, in compute_contrast
Y = self.masker_.transform(effect_maps)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nilearn/input_data/base_masker.py”, line 177, in transform
return self.transform_single_imgs(imgs, confounds)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nilearn/input_data/nifti_masker.py”, line 405, in transform_single_imgs
dtype=self.dtype

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/joblib/memory.py”, line 352, in call
return self.func(*args, **kwargs)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nilearn/input_data/nifti_masker.py”, line 41, in filter_and_mask
imgs = _utils.check_niimg(imgs, atleast_4d=True, ensure_ndim=4)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nilearn/_utils/niimg_conversions.py”, line 260, in check_niimg
return concat_niimgs(niimg, ensure_ndim=ensure_ndim, dtype=dtype)

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nilearn/_utils/niimg_conversions.py”, line 459, in concat_niimgs
memory=memory, memory_level=memory_level))):

File “/opt/miniconda-latest/envs/neuro/lib/python3.6/site-packages/nilearn/_utils/niimg_conversions.py”, line 150, in _iter_check_niimg
niimg.shape))

ValueError: Field of view of image #6 is different from reference FOV.
Reference affine:
array([[ 3.43700004, 0. , 0. , -96.5 ],
[ 0. , 3.43799996, 0. , -132.5 ],
[ 0. , 0. , 4.5999999 , -78.5 ],
[ 0. , 0. , 0. , 1. ]])
Image affine:
array([[ 3.43799996, 0. , 0. , -96.5 ],
[ 0. , 3.43799996, 0. , -132.5 ],
[ 0. , 0. , 4.5999999 , -78.5 ],
[ 0. , 0. , 0. , 1. ]])
Reference shape:
(57, 68, 43)
Image shape:
(57, 68, 43, 1)

I meet the same issue. I fixed it by convert 3D nii to 4D.