Closed Kateridge closed 2 years ago
Hi @Kateridge,
Do you have crash files (.pklz) you could share with us so that we can look at the content?
It looks like there is an issue with the execution of and ants
interface
Exception raised while executing Node antsRegistrationT1W2MNI.
Regards,
Omar
Thanks for your reply! The crash file is attached. crash-20220830-170741-kateridge-antsRegistrationT1W2MNI.a0-2da88e71-12f6-4be7-b562-783050012b3d.zip
The zip seems to contain a file without an extension (which I can not seem to read) can you try to copy the original pklz file?
I cannot directly upload pklz file because of the file type restriction of the attachment.
So, I repack the orginal pklz file here: crash_log.zip;
or you can access it through Google Drive: I'm a link;
or I read the pklz file using nipypecli crash ...
:
(clinica) kateridge@IDEALAB-ZYW:~/Projects/Projects/Datasets/test$ nipypecli crash crash-20220830-170741-kateridge-antsRegistrationT1W2MNI.a0-2da88e71-12f6-4be7-b562-783050012b3d.pklz
File: /home/kateridge/Projects/Projects/Datasets/test/crash-20220830-170741-kateridge-antsRegistrationT1W2MNI.a0-2da88e71-12f6-4be7-b562-783050012b3d.pklz
Node: pet-linear.antsRegistrationT1W2MNI
Working directory: /home/kateridge/Projects/Projects/Datasets/test/temp/pet-linear/1a489671f7c4c87cd1e0f4035fb465f78c45bad8/antsRegistrationT1W2MNI
Node inputs:
args = <undefined>
collapse_output_transforms = True
convergence_threshold = [1e-05]
convergence_window_size = [10]
dimension = 3
environ = {'NSLOTS': '1'}
fixed_image = ['/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/clinica/resources/masks/mni_icbm152_t1_tal_nlin_sym_09c.nii']
fixed_image_mask = <undefined>
fixed_image_masks = <undefined>
float = <undefined>
initial_moving_transform = <undefined>
initial_moving_transform_com = <undefined>
initialize_transforms_per_stage = False
interpolation = Linear
interpolation_parameters = <undefined>
invert_initial_moving_transform = <undefined>
metric = ['MI']
metric_item_trait = <undefined>
metric_stage_trait = <undefined>
metric_weight = [1.0]
metric_weight_item_trait = 1.0
metric_weight_stage_trait = <undefined>
moving_image = ['/home/kateridge/Projects/Projects/Datasets/test/BIDS/sub-ADNI941S4377/ses-M00/anat/sub-ADNI941S4377_ses-M00_T1w.nii.gz']
moving_image_mask = <undefined>
moving_image_masks = <undefined>
num_threads = 1
number_of_iterations = [[200, 50, 10]]
output_inverse_warped_image = <undefined>
output_transform_prefix = transform
output_warped_image = <undefined>
radius_bins_item_trait = 5
radius_bins_stage_trait = <undefined>
radius_or_number_of_bins = [32]
random_seed = <undefined>
restore_state = <undefined>
restrict_deformation = <undefined>
sampling_percentage = <undefined>
sampling_percentage_item_trait = <undefined>
sampling_percentage_stage_trait = <undefined>
sampling_strategy = <undefined>
sampling_strategy_item_trait = <undefined>
sampling_strategy_stage_trait = <undefined>
save_state = <undefined>
shrink_factors = [[8, 4, 2]]
sigma_units = ['vox']
smoothing_sigmas = [[3.0, 2.0, 1.0]]
transform_parameters = [(0.1, 3.0, 0.0)]
transforms = ['SyN']
use_estimate_learning_rate_once = <undefined>
use_histogram_matching = False
verbose = True
winsorize_lower_quantile = 0.005
winsorize_upper_quantile = 0.995
write_composite_transform = False
Traceback:
Traceback (most recent call last):
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 524, in run
result = self._run_interface(execute=True)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 642, in _run_interface
return self._run_command(execute)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 750, in _run_command
raise NodeExecutionError(
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node antsRegistrationT1W2MNI.
Traceback (most recent call last):
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 454, in aggregate_outputs
setattr(outputs, key, val)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/traits/trait_types.py", line 2695, in validate
return TraitListObject(self, object, name, value)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/traits/trait_list_object.py", line 584, in __init__
super().__init__(
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/traits/trait_list_object.py", line 213, in __init__
super().__init__(self.item_validator(item) for item in iterable)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
super().__init__(self.item_validator(item) for item in iterable)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/traits/trait_list_object.py", line 867, in _item_validator
return trait_validator(object, self.name, value)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
value = super(File, self).validate(objekt, name, value, return_pathlike=True)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
self.error(objekt, name, str(value))
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: Each element of the 'reverse_transforms' trait of a RegistrationOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/home/kateridge/Projects/Projects/Datasets/test/temp/pet-linear/1a489671f7c4c87cd1e0f4035fb465f78c45bad8/antsRegistrationT1W2MNI/transform0InverseWarp.nii.gz' <class 'str'> was specified.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 401, in run
outputs = self.aggregate_outputs(runtime)
File "/home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 461, in aggregate_outputs
raise FileNotFoundError(msg)
FileNotFoundError: No such file or directory '['/home/kateridge/Projects/Projects/Datasets/test/temp/pet-linear/1a489671f7c4c87cd1e0f4035fb465f78c45bad8/antsRegistrationT1W2MNI/transform0InverseWarp.nii.gz']' for output 'reverse_transforms' of a Registration interface
I see, thanks ! Unfortunately there is not much more info. I tried running locally on some test input and it seems to work on my part.
One thing to try is to have a look in the temp
directory (/home/kateridge/Projects/Projects/Datasets/test/temp/pet-linear/1a489671f7c4c87cd1e0f4035fb465f78c45bad8/antsRegistrationT1W2MNI/) and see if you have a
command.txt` file.
The command that Nipype tried to execute and failed should be there. You can try executing it manually in the command line and see if it works.
Let me know,
Thanks.
I execute the command manually and it dosen't work. It got a Segmentation fault
and then exited.
(base) kateridge@IDEALAB-ZYW:~/Projects/Projects/Datasets/test/temp/pet-linear/1a489671f7c4c87cd1e0f4035fb465f78c45bad8/antsRegistrationT1W2MNI$ antsRegistration --collapse-output-transforms 1 --dimensionality 3 --initialize-transforms-per-stage 0 --interpolation Linear --output transform --transform SyN[ 0.1, 3.0, 0.0 ] --metric MI[ /home/kateridge/anaconda3/envs/clinica/lib/python3.8/site-packages/clinica/resources/masks/mni_icbm152_t1_tal_nlin_sym_09c.nii, /home/kateridge/Projects/Projects/Datasets/test/BIDS/sub-ADNI941S4377/ses-M00/anat/sub-ADNI941S4377_ses-M00_T1w.nii.gz, 1, 32 ] --convergence [ 200x50x10, 1e-05, 10 ] --smoothing-sigmas 3.0x2.0x1.0vox --shrink-factors 8x4x2 --use-histogram-matching 0 -v --winsorize-image-intensities [ 0.005, 0.995 ] --write-composite-transform 0
All_Command_lines_OK
Segmentation fault (core dumped)
I'm not entirely sure what is happening but it seems it is more of an issue with Ants
(or that specific version of Ants
) and / or the execution environment as I don't see anything suspicious with the command at first glance.
For reference we are using ants 2.2.0.
Thanks for your help! I may reinstall the environments and try again to see if it works.
Closing as it seems not caused directly by Clinica. Don't hesitate to reopen if necessary.
Describe the bug I have successfully performed
t1-linear
on some ADNI data, but I cannot further executepet-linear
pipeline.To Reproduce Subjects used: 941_S_4377, 941_S_4420, 941_S_4764 1) Execute
t1-linear
(works fine) 2) Executepet-linear
(get following errors):Looks like it gets a str of a list rather than a path
Desktop (please complete the following information):