Need help with heudiconv

Can anyone please help me with this? I am trying to use heudiconv to convert my DWI dataset into BIDS format and this is where I am stuck at–

$ docker run --rm -it -v /${PWD}:/base nipy/heudiconv:latest -d /base/{subject}/*.dcm -o /base/Nifti/ -f convertall -c none
INFO: Running heudiconv version 0.6.0.dev1
Traceback (most recent call last):
File “/opt/miniconda-latest/bin/heudiconv”, line 11, in
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 260, in process_args
args.subjs, grouping=args.grouping)
File “/src/heudiconv/heudiconv/parser.py”, line 131, in get_study_sessions
for sid in sids:
TypeError: ‘NoneType’ object is not iterable

Ahoi hoi @bishnoiramj,

thank you very much for your post and welcome to neurostars!

It looks like you’re missing the subject identifier in your command. For example, if you want to convert subject 01 your command should be:

docker run --rm -it -v /${PWD}:/base nipy/heudiconv:latest -d /base/{subject}/*.dcm -o /base/Nifti/ -f convertall -c none -s 01

In case you have multiple session, you might want to include a session identifier:

docker run --rm -it -v /${PWD}:/base nipy/heudiconv:latest -d /base/{subject}/*.dcm -o /base/Nifti/ -f convertall -c none -s 01 -ss test

HTH, cheers, Peer

2 Likes