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

FileDataset object has no attribute ContentDate #336

Closed
1 task
araikes opened this issue Apr 30, 2019 · 1 comment · Fixed by #337
Closed
1 task

FileDataset object has no attribute ContentDate #336

araikes opened this issue Apr 30, 2019 · 1 comment · Fixed by #337

Comments

@araikes
Copy link

araikes commented Apr 30, 2019

Summary

convertall.txt

I am attempting to use Heudiconv to convert an older dataset in our lab. All sequences were run on a Siemens TrioTim. When running (heuristic attached), I get the following error:

docker run --rm -it -v ${PWD}:/base nipy/heudiconv:0.5.4 -d /base/source/{subject}/{session}/*/*.dcm -o /base/nifti -f /base/code/convertall.py -s 002 -ss bline -c dcm2niix -b --minmeta --overwrite
INFO: Running heudiconv version 0.5.4
INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': '002', 'outdir': '/base/nifti/', 'session': 'bline'}
INFO: Processing 2511 dicoms
INFO: Analyzing 2511 dicoms
/src/heudiconv/heudiconv/dicoms.py:58: UserWarning: The DICOM readers are highly experimental, unstable, and only work for Siemens time-series at the moment
Please use with caution.  We would be grateful for your help in improving them
  import nibabel.nicom.dicomwrappers as dw
INFO: Generated sequence info with 22 entries
INFO: Doing conversion using dcm2niix
INFO: Converting /base/nifti/sub-HarvBL002/ses-bline/anat/sub-HarvBL002_ses-bline_run-001_T1w (176 DICOMs) -> /base/nifti/sub-HarvBL002/ses-bline/anat . Converter: dcm2niix . Output types: ('nii.gz',)
190430-22:41:09,488 nipype.workflow INFO:
         [Node] Setting-up "convert" in "/tmp/dcm2niixidnhkk01/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixidnhkk01/convert".
190430-22:41:09,525 nipype.workflow INFO:
         [Node] Running "convert" ("nipype.interfaces.dcm2nii.Dcm2niix"), a CommandLine Interface with command:
dcm2niix -b y -z y -x n -t n -m n -f anat -o . -s n -v n /tmp/dcm2niixidnhkk01/convert
INFO: [Node] Running "convert" ("nipype.interfaces.dcm2nii.Dcm2niix"), a CommandLine Interface with command:
dcm2niix -b y -z y -x n -t n -m n -f anat -o . -s n -v n /tmp/dcm2niixidnhkk01/convert
190430-22:41:10,617 nipype.interface INFO:
         stdout 2019-04-30T22:41:10.616984:Chris Rorden's dcm2niiX version v1.0.20190410  GCC6.3.0 (64-bit Linux)
INFO: stdout 2019-04-30T22:41:10.616984:Chris Rorden's dcm2niiX version v1.0.20190410  GCC6.3.0 (64-bit Linux)
190430-22:41:10,617 nipype.interface INFO:
         stdout 2019-04-30T22:41:10.616984:Found 176 DICOM file(s)
INFO: stdout 2019-04-30T22:41:10.616984:Found 176 DICOM file(s)
190430-22:41:10,617 nipype.interface INFO:
         stdout 2019-04-30T22:41:10.616984:Convert 176 DICOM as ./anat (256x256x176x1)
INFO: stdout 2019-04-30T22:41:10.616984:Convert 176 DICOM as ./anat (256x256x176x1)
190430-22:41:10,844 nipype.interface INFO:
         stdout 2019-04-30T22:41:10.844483:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./anat.nii"
INFO: stdout 2019-04-30T22:41:10.844483:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./anat.nii"
190430-22:41:10,844 nipype.interface INFO:
         stdout 2019-04-30T22:41:10.844483:Conversion required 1.246532 seconds (0.354787 for core code).
INFO: stdout 2019-04-30T22:41:10.844483:Conversion required 1.246532 seconds (0.354787 for core code).
190430-22:41:10,872 nipype.workflow INFO:
         [Node] Finished "convert".
INFO: [Node] Finished "convert".
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'ContentDate'
190430-22:41:14,427 nipype.workflow INFO:
         [Node] Setting-up "embedder" in "/tmp/embedmetauhj0355v/embedder".
INFO: [Node] Setting-up "embedder" in "/tmp/embedmetauhj0355v/embedder".
190430-22:41:14,456 nipype.workflow INFO:
         [Node] Running "embedder" ("nipype.interfaces.utility.wrappers.Function")
INFO: [Node] Running "embedder" ("nipype.interfaces.utility.wrappers.Function")
190430-22:41:14,466 nipype.workflow INFO:
         [Node] Finished "embedder".
INFO: [Node] Finished "embedder".
INFO: Post-treating /base/nifti/sub-HarvBL002/ses-bline/anat/sub-HarvBL002_ses-bline_run-001_T1w.json file
INFO: Converting /base/nifti/sub-HarvBL002/ses-bline/anat/sub-HarvBL002_ses-bline_run-002_T1w (176 DICOMs) -> /base/nifti/sub-HarvBL002/ses-bline/anat . Converter: dcm2niix . Output types: ('nii.gz',)
190430-22:41:14,500 nipype.workflow INFO:
         [Node] Setting-up "convert" in "/tmp/dcm2niixui0ce2ku/convert".
INFO: [Node] Setting-up "convert" in "/tmp/dcm2niixui0ce2ku/convert".
190430-22:41:14,541 nipype.workflow INFO:
         [Node] Running "convert" ("nipype.interfaces.dcm2nii.Dcm2niix"), a CommandLine Interface with command:
dcm2niix -b y -z y -x n -t n -m n -f anat -o . -s n -v n /tmp/dcm2niixui0ce2ku/convert
INFO: [Node] Running "convert" ("nipype.interfaces.dcm2nii.Dcm2niix"), a CommandLine Interface with command:
dcm2niix -b y -z y -x n -t n -m n -f anat -o . -s n -v n /tmp/dcm2niixui0ce2ku/convert
190430-22:41:15,548 nipype.interface INFO:
         stdout 2019-04-30T22:41:15.548758:Chris Rorden's dcm2niiX version v1.0.20190410  GCC6.3.0 (64-bit Linux)
INFO: stdout 2019-04-30T22:41:15.548758:Chris Rorden's dcm2niiX version v1.0.20190410  GCC6.3.0 (64-bit Linux)
190430-22:41:15,549 nipype.interface INFO:
         stdout 2019-04-30T22:41:15.548758:Found 176 DICOM file(s)
INFO: stdout 2019-04-30T22:41:15.548758:Found 176 DICOM file(s)
190430-22:41:15,549 nipype.interface INFO:
         stdout 2019-04-30T22:41:15.548758:Convert 176 DICOM as ./anat (256x256x176x1)
INFO: stdout 2019-04-30T22:41:15.548758:Convert 176 DICOM as ./anat (256x256x176x1)
190430-22:41:15,795 nipype.interface INFO:
         stdout 2019-04-30T22:41:15.795429:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./anat.nii"
INFO: stdout 2019-04-30T22:41:15.795429:Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./anat.nii"
190430-22:41:15,795 nipype.interface INFO:
         stdout 2019-04-30T22:41:15.795429:Conversion required 1.229756 seconds (0.356964 for core code).
INFO: stdout 2019-04-30T22:41:15.795429:Conversion required 1.229756 seconds (0.356964 for core code).
190430-22:41:15,831 nipype.workflow INFO:
         [Node] Finished "convert".
INFO: [Node] Finished "convert".
WARNING: Failed to get date/time for the content: 'FileDataset' object has no attribute 'ContentDate'
Traceback (most recent call last):
  File "/opt/miniconda-latest/bin/heudiconv", line 11, in <module>
    load_entry_point('heudiconv', 'console_scripts', 'heudiconv')()
  File "/src/heudiconv/heudiconv/cli/run.py", line 127, in main
    process_args(args)
  File "/src/heudiconv/heudiconv/cli/run.py", line 323, in process_args
    dcmconfig=args.dcmconfig,)
  File "/src/heudiconv/heudiconv/convert.py", line 199, in prep_conversion
    dcmconfig=dcmconfig,)
  File "/src/heudiconv/heudiconv/convert.py", line 292, in convert
    save_scans_key(item, bids_outfiles)
  File "/src/heudiconv/heudiconv/bids.py", line 309, in save_scans_key
    op.join(output_dir, 'sub-{0}{1}_scans.tsv'.format(subj, ses)), rows)
  File "/src/heudiconv/heudiconv/bids.py", line 342, in add_rows_to_scans_keys_file
    data_rows_sorted = sorted(data_rows, key=lambda x: (x[1], x[0]))
TypeError: '<' not supported between instances of 'NoneType' and 'str'

It's fine creating the images and jsons for this image. However, it fails out and doesn't continue processing the func/dwi/fmap files. This happens for all of my participants (n =32 x 2 sessions)

Any help would be appreciated.

Thanks

Platform details:

Choose one:

  • Local environment
  • [ x] Container

nipy/heudiconv:0.5.4

  • Heudiconv version:
@mgxd
Copy link
Member

mgxd commented May 1, 2019

@araikes I was able to confirm the bug - I've submitted a fix for it.

Once it's merged, the updated code will be available in the nipy/heudiconv:unstable container

@mgxd mgxd closed this as completed in #337 May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants