Dwipreproc object has no attribute [resolved]

Hi MRTrix experts, I got the following error when I ran the dwipreproc script on my data. What could be going on, and how might I fix this?

I ran the following command:
dwipreproc -rpe_none -fslgrad rawbvecs rawbvals -tempdir tmp -export_grad_fsl bvecs bvals AP rawdwi.nii.gz dwi.nii.gz

After running for a long time, I see the following on my terminal:
Command: mrconvert dwi_post_eddy.nii.gz result.mif -stride -1,-2,3,4 -fslgrad dwi_post_eddy.eddy_rotated_bvecs bvals -quiet
Traceback (most recent call last):
File “/home/yuany4/mrtrix3/scripts/dwipreproc”, line 399, in
grad_export_option = ’ -export_grad_fsl ’ + os.path.join(lib.app.workingDir, lib.app.args.export_grad_mrtrix[0]) + ’ ’ + os.path.join(lib.app.workingDir, lib.app.args.export_grad_mrtrix[1])
TypeError: ‘NoneType’ object has no attribute ‘getitem

Thanks in advance!

Apologies: that’s my bad. It was kind of inevitable that following the massive script changes with the recent update, with a lot more options & configurations available, I’d leave a silly bug or two lying around.

I will merge the fix into the code once the required status checks are completed (in an hour or so). If you then update your code using git pull, the problem should go away.

Thanks for the report!
Rob

Hi Robert,

Thanks for the quick fix, everything is working splendidly now! I’m going to mark this as resolved =)