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

SCORE/SCRUB disabled #278

Closed
Jian-uon opened this issue May 9, 2023 · 6 comments · Fixed by #279
Closed

SCORE/SCRUB disabled #278

Jian-uon opened this issue May 9, 2023 · 6 comments · Fixed by #279
Labels
bug Something isn't working

Comments

@Jian-uon
Copy link

Jian-uon commented May 9, 2023

Summary

I used Aslprep in docker to process ASL data, but met an error:

230509-07:12:03,895 nipype.workflow ERROR:
	 could not run node: aslprep_wf.single_subject_101_wf.asl_preproc_run_1_wf.cbf_plot.cbf_ts_summary
230509-07:12:04,85 nipype.workflow CRITICAL:
	 ASLPrep failed: Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node cbf_ts_summary.

Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 985, in _read
	    data = iter(fname)
	TypeError: '_Undefined' object is not iterable

	The above exception was the direct cause of the following exception:

	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 397, in run
	    runtime = self._run_interface(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/aslprep/interfaces/plotting.py", line 154, in _run_interface
	    fig = CBFtsPlot(
	  File "/usr/local/miniconda/lib/python3.8/site-packages/aslprep/utils/plotting.py", line 128, in __init__
	    volindex = np.loadtxt(scoreindex)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 1356, in loadtxt
	    arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
	  File "/usr/local/miniconda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 987, in _read
	    raise ValueError(
	ValueError: fname must be a string, filehandle, list of strings,
	or generator. Got <class 'traits.trait_base._Undefined'> instead.


230509-07:12:05,5 cli ERROR:
	 Preprocessing did not finish successfully. Errors occurred while processing data from participants: 101 (2). Check the HTML reports for details.
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds

My command

Additional details

  • ASLPrep version:0.3.0
  • Docker version: 23.0.5, build bc4487a, MAC OS
  • Singularity version:

There are two text files in the log folder.

Node: aslprep_wf.single_subject_101_wf.asl_preproc_run_1_wf.parcellate_cbf_wf.warp_atlases_to_asl_space
Working directory: /work/aslprep_wf/single_subject_101_wf/asl_preproc_run_1_wf/parcellate_cbf_wf/warp_atlases_to_asl_space

Node inputs:

args = <undefined>
default_value = 0.0
dimension = 3
environ = {'NSLOTS': '1'}
float = False
input_image = <undefined>
input_image_type = 3
interpolation = GenericLabel
interpolation_parameters = <undefined>
invert_transform_flags = <undefined>
num_threads = 1
out_postfix = _trans
output_image = <undefined>
print_out_composite_warp_file = <undefined>
reference_image = <undefined>
transforms = <undefined>

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 292, in _send_procs_to_workers
    num_subnodes = self.procs[jobid].num_subnodes()
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 1308, in num_subnodes
    self._get_inputs()
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 1322, in _get_inputs
    super(MapNode, self)._get_inputs()
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 619, in _get_inputs
    self.set_input(key, deepcopy(output_value))
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 1157, in set_input
    self._set_mapnode_input(parameter, deepcopy(val))
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 1164, in _set_mapnode_input
    setattr(self._inputs, name, newvalue)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 424, in validate
    value = super(MultiObject, self).validate(objekt, name, newvalue)
  File "/usr/local/miniconda/lib/python3.8/site-packages/traits/trait_types.py", line 2699, in validate
    return TraitListObject(self, object, name, value)
  File "/usr/local/miniconda/lib/python3.8/site-packages/traits/trait_list_object.py", line 582, in __init__
    super().__init__(
  File "/usr/local/miniconda/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 "/usr/local/miniconda/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 "/usr/local/miniconda/lib/python3.8/site-packages/traits/trait_list_object.py", line 865, in _item_validator
    return trait_validator(object, self.name, value)
  File "/usr/local/miniconda/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 "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
    self.error(objekt, name, str(value))
  File "/usr/local/miniconda/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
    raise TraitError(
traits.trait_errors.TraitError: Each element of the 'input_image' trait of a DynamicTraitedSpec instance must be a pathlike object or string representing an existing file, but a value of '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_100Parcels_17Networks_order_FSLMNI152_2mm.nii' <class 'str'> was specified.

Error setting node input:
Node: warp_atlases_to_asl_space
input: input_image
results_file: /work/aslprep_wf/single_subject_101_wf/asl_preproc_run_1_wf/parcellate_cbf_wf/atlas_file_grabber/result_atlas_file_grabber.pklz
value: ['/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_100Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_200Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_300Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_400Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_500Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_600Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_700Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_800Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_900Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/Schaefer2018_1000Parcels_17Networks_order_FSLMNI152_2mm.nii', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/glasser360/glasser360MNI.nii.gz', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/gordon333/gordon333MNI.nii.gz', '/usr/local/miniconda/lib/python3.8/site-packages/aslprep/data/niftiatlas/TianSubcortical/Tian_Subcortex_S3_3T.nii.gz']


When creating this crashfile, the results file corresponding
to the node could not be found.
Node: aslprep_wf.single_subject_101_wf.asl_preproc_run_1_wf.cbf_plot.cbf_ts_summary
Working directory: /work/aslprep_wf/single_subject_101_wf/asl_preproc_run_1_wf/cbf_plot/cbf_ts_summary

Node inputs:

cbf_ts = <undefined>
conf_file = <undefined>
score_file = <undefined>
seg_file = <undefined>
tr = 2.4

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node cbf_ts_summary.

Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 985, in _read
	    data = iter(fname)
	TypeError: '_Undefined' object is not iterable

	The above exception was the direct cause of the following exception:

	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 397, in run
	    runtime = self._run_interface(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/aslprep/interfaces/plotting.py", line 154, in _run_interface
	    fig = CBFtsPlot(
	  File "/usr/local/miniconda/lib/python3.8/site-packages/aslprep/utils/plotting.py", line 128, in __init__
	    volindex = np.loadtxt(scoreindex)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 1356, in loadtxt
	    arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
	  File "/usr/local/miniconda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 987, in _read
	    raise ValueError(
	ValueError: fname must be a string, filehandle, list of strings,
	or generator. Got <class 'traits.trait_base._Undefined'> instead.

About my data:

{"Manufacturer":"Siemens",
"ManufacturersModelName":"Investigational_Device_7T",
"SoftwareVersions":"N4_VE12U_LATEST_20181126",
"MagneticFieldStrength":7,
"ReceiveCoilName":"8Tx32Rx_Head",
"ReceiveCoilActiveElements":"AC",
"PulseSequenceType":"2D_EPI",
"ScanningSequence":"EP",
"SequenceVariant":"SK",
"ScanOptions":"PFP_SAT1_FS",
"SequenceName":"epUHF2d1_98",
"PulseSequenceDetails":"Investigational_Device_7T-syngo_MR_E12",
"MRAcquisitionType":"2D",
"ParallelReductionFactorInPlane":2,
"PartialFourier":0.75,
"PhaseEncodingDirection":"j-",
"EffectiveEchoSpacing":0.000264999783,
"TotalReadoutTime":0.025704978922,
"EchoTime":0.014,
"SliceTiming":[0,0.0325,0.065,0.095,0.1275,0.15999999999,0.19249999999,0.22249999999,0.25499999999,0.28749999999,0.31999999999,0.34999999999,0,0.0325,0.065,0.095,0.1275,0.15999999999,0.19249999999,0.22249999999,0.25499999999,0.28749999999,0.31999999999,0.34999999999],
"DwellTime":0.0000022,
"FlipAngle":90,
"MultibandAccelerationFactor":2,
"RepetitionTimePreparation":2.4,
"ArterialSpinLabelingType":"PASL",
"PostLabelingDelay":1.8,
"BackgroundSuppression":true,
"M0Type":"Separate",
"VascularCrushing":false,
"TotalAcquiredPairs":1,
"BolusCutOffFlag":true,
"PASLType":"FAIR",
"BolusCutOffDelayTime":0.7,
"BolusCutOffTechnique":"QUIPSS"}
@Jian-uon Jian-uon added the bug Something isn't working label May 9, 2023
@tsalo
Copy link
Member

tsalo commented May 9, 2023

Thanks @Jian-uon. Can you share the command-line call you used as well?

@Jian-uon
Copy link
Author

Jian-uon commented May 9, 2023

Sorry, somehow missed my command.

docker run -v /Users/jianhu/Documents/OSIPI/Dataset6:/data -v /Users/jianhu/Documents/license.txt:/license.txt pennlinc/aslprep /data/rawdata /data/results participant --participant-label 101 -w /work --fs-license-file /license.tx

@tsalo
Copy link
Member

tsalo commented May 9, 2023

Thanks!

@tsalo
Copy link
Member

tsalo commented May 9, 2023

@Jian-uon I have merged a fix, and it finally just deployed to DockerHub. Would you be willing to try running with the new pennlinc/aslprep:unstable?

@Jian-uon
Copy link
Author

Jian-uon commented May 9, 2023

It's so fast! Sure! Going to run the version you specified. Many thanks for your help!

@tsalo
Copy link
Member

tsalo commented May 9, 2023

Please reopen this issue if the same problem crops up, or open a new issue for any new bugs you come across. Thanks for testing out the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants