bids-apps / MRtrix3_connectome

Generate subject connectomes from raw BIDS data & perform inter-subject connection density normalisation, using the MRtrix3 software package.
http://www.mrtrix.org/
Apache License 2.0
49 stars 26 forks source link

JSON exceptions #99

Open Lestropie opened 3 years ago

Lestropie commented 3 years ago

If a JSON is malformed, which can occur when manually adding the IntendedFor field to fmap/ files, the resulting Python exception is unhandled, and so a catastrophic crash occurs. It would be preferable to catch such and give a more informative error message.

treanus commented 3 years ago

It also seems that the IntendedFor field can only have 1 entry. The case "IntendedFor": ["dwi/sub-01_acq-b1000_dwi.nii.gz", "dwi/sub-01_acq-b3000_dwi.nii.gz"] e.g. throws an error. An fmap could be used for sdc for more than 1 dwi dataset, no?

Lestropie commented 3 years ago

Code here is intended to deal with the prospect of IntendedFor being either a string or a list of strings. If that's not working, that's worthy of its own issue listing.