Skip to content

The trait 'converted_files' of a Dcm2niixOutputSpec .. is an existing file name, but the path ....nii.gz' does not exist  #2474

Closed
@yarikoptic

Description

@yarikoptic

Summary

Originally reported by @mvdoc against heudiconv as a problem which came up with an upgrade to 1.0.0 nipype: nipy/heudiconv#150
I have decided to share here (as well) since seems might be just nipype specific:

here is the log:

INFO: Doing conversion using dcm2niix
INFO: Converting /tmp/pytest-of-yoh/pytest-8/test_scout_conversion0/Halchenko/Yarik/950_bids_test4/phantom1sid1/sub-phantom1sid1/ses-localizer/fmap/sub-phantom1sid1_ses-localizer_acq-3mm_phasediff (1 DICOMs) -> /tmp/pytest-of-yoh/pytest-8/test_scout_conversion0/Halchenko/Yarik/950_bids_test4/phantom1sid1/sub-phantom1sid1/ses-localizer/fmap . Converter: dcm2niix . Output types: ('nii.gz', 'dicom')
INFO: Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
INFO: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
INFO: [Node] Setting-up "convert" in "/home/yoh/.tmp/dcm2niix08ng94/convert".
INFO: [Node] Running "convert" ("nipype.interfaces.dcm2nii.Dcm2niix"), a CommandLine Interface with command:
dcm2niix -b n -z i -x n -t n -m n -f fmap -o /home/yoh/picts/mris/heudiconv -s n -v n /home/yoh/.tmp/dcm2niix08ng94/convert/1.3.12.2.1107.5.2.43.66112.2016101409263663466202201.dcm
INFO: stdout 2018-02-28T20:54:55.269700:Chris Rorden's dcm2niiX version v1.0.20171215 (OpenJPEG build) GCC7.2.0 (64-bit Linux)
INFO: stdout 2018-02-28T20:54:55.269700:Found 1 DICOM image(s)
INFO: stdout 2018-02-28T20:54:55.269700:Convert 1 DICOM as /tmp/dcm2niix08ng94/convert/fmap_e2 (64x64x1x1)
INFO: stdout 2018-02-28T20:54:55.269700:Warning: Check that 2D images are not mirrored.
INFO: stdout 2018-02-28T20:54:55.269700:Conversion required 0.000793 seconds (0.000790 for core code).
WARNING: [Node] Error on "convert" (/home/yoh/.tmp/dcm2niix08ng94/convert)
FAILED

================================================================================================================== FAILURES ==================================================================================================================
___________________________________________________________________________________________________________ test_scout_conversion ____________________________________________________________________________________________________________
tests/test_mvdoc.py:11: in test_scout_conversion
    runner(args)
heudiconv/cli/run.py:120: in main
    process_args(args)
heudiconv/cli/run.py:330: in process_args
    overwrite=args.overwrite,)
heudiconv/convert.py:194: in prep_conversion
    overwrite=overwrite,)
heudiconv/convert.py:278: in convert
    bids, tmpdir)
heudiconv/convert.py:403: in nipype_convert
    eg = convertnode.run()
/usr/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py:487: in run
    result = self._run_interface(execute=True)
/usr/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py:571: in _run_interface
    return self._run_command(execute)
/usr/lib/python2.7/dist-packages/nipype/pipeline/engine/nodes.py:668: in _run_command
    _save_resultfile(result, outdir, self.name)
/usr/lib/python2.7/dist-packages/nipype/pipeline/engine/utils.py:244: in save_resultfile
    result.outputs.set(**modify_paths(outputs, relative=True, basedir=cwd))
/usr/lib/python2.7/dist-packages/traits/util/deprecated.py:32: in wrapper
    return fn(*args, **kw)
/usr/lib/python2.7/dist-packages/traits/has_traits.py:1552: in set
    trait_change_notify=trait_change_notify, **traits)
/usr/lib/python2.7/dist-packages/traits/has_traits.py:1544: in trait_set
    setattr( self, name, value )
/usr/lib/python2.7/dist-packages/nipype/interfaces/base/traits_extension.py:341: in validate
    value = super(MultiPath, self).validate(object, name, newvalue)
/usr/lib/python2.7/dist-packages/traits/trait_types.py:2337: in validate
    return TraitListObject( self, object, name, value )
/usr/lib/python2.7/dist-packages/traits/trait_handlers.py:2313: in __init__
    raise excp
E   TraitError: The trait 'converted_files' of a Dcm2niixOutputSpec instance is an existing file name, but the path  '/tmp/dcm2niix08ng94/convert/fmap_e2.nii.gz' does not exist.

so, for some reason nipype expects output to be in the source directory of the data -- not the output (provided to dcm2niix with -o, although now I am confused why current directory was chosen as the target (but that sounds like heudiconv issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions