# The command dwifslpreproc error in MRtrix3 version 3.0.3 while correctly run in the version 3.0.2

**URL:** https://community.mrtrix.org/t/the-command-dwifslpreproc-error-in-mrtrix3-version-3-0-3-while-correctly-run-in-the-version-3-0-2/5841
**Category:** Uncategorized
**Tags:** error, preprocessing, tractography
**Created:** [June 16, 2022, 1:57pm UTC](https://community.mrtrix.org/t/the-command-dwifslpreproc-error-in-mrtrix3-version-3-0-3-while-correctly-run-in-the-version-3-0-2/5841 "2022-06-16T13:57:59Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)
#### Post date: [June 22, 2022, 3:05pm UTC](https://community.mrtrix.org/t/the-command-dwifslpreproc-error-in-mrtrix3-version-3-0-3-while-correctly-run-in-the-version-3-0-2/5841/3 "2022-06-22T15:05:52Z")

</div>

Hi @GaoxingZheng,

Sorry this isn’t working for you. I’ve been looking into this, and I can reproduce the error using 3.0.3. This doesn’t happen on our current master branch though (soon to be released as 3.0.4), and I’ll freely admit I’m not sure why that is.

The main reason is that the DW scheme information is supposed to be stored in the JSON sidecar file (`dwi_pad2_pe_0.json`) at this point:

```auto
Command: mrconvert dwi_pad2.mif dwi_pad2_pe_0.nii -coord 3 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32 -strides -1,+2,+3,+4 -json_export dwi_pad2_pe_0.json

```

and this is then fed back in during the subsequent conversion back to `mif`:

```auto
Command: mrconvert dwi_pad2_pe_0_applytopup.nii dwi_pad2_pe_0_applytopup.mif -json_import dwi_pad2_pe_0.json

```

But on 3.0.3, the JSON file doesn’t contain the DW scheme information. Works fine on the `master`, though I can’t identify a single change in the code that would explain this… 🤷‍♂️

In the meantime, the simplest thing is just to make sure your input `mif` file already contains the correct DW information:

```auto
mrconvert ${Output_Folder}/Tracking/degibbs.mif ${Output_Folder}/Tracking/DWI_preproc_in.mif -fslgrad ${Output_Folder}/Tracking/AP_PA.bvec ${Output_Folder}/Tracking/AP_PA.bval

```

and use the resulting `${Output_Folder}/Tracking/DWI_preproc_in.mif` as your input to `dwifslpreproc` _without_ the `-fslgrad` option. That _should_ work – though you may [encounter a different bug](https://community.mrtrix.org/t/dwifslpreproc-error-somewhere-after-the-topup-process/5248/4) in the process (also fixed on `master`, but not yet released… 😬).

---

_[View the full topic](https://community.mrtrix.org/t/the-command-dwifslpreproc-error-in-mrtrix3-version-3-0-3-while-correctly-run-in-the-version-3-0-2/5841)._
