# Dwi2fod busted

**URL:** <https://community.mrtrix.org/t/dwi2fod-busted/849>\
**Category:** Uncategorized\
**Created:** [April 21, 2017, 4:47pm UTC](https://community.mrtrix.org/t/dwi2fod-busted/849 "2017-04-21T16:47:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goku](https://community.mrtrix.org/user_avatar/community.mrtrix.org/goku/32/1854_2.png) [@Goku](https://community.mrtrix.org/u/Goku)\
**Post date:** [April 21, 2017, 4:47pm UTC](https://community.mrtrix.org/t/dwi2fod-busted/849/1 "2017-04-21T16:47:55Z")

</div>

dwi2fod crashes. Here’s the error message dwi2fod: [ERROR] expected exactly 3 arguments (8 supplied)

dwi2fod msmt\_csd DWI.mif RF\_WM.txt WM\_FODs.mif RF\_GM.txt GM.mif RF\_CSF.txt CSF.mif -mask nodif\_brain\_mask.nii.gz

I pulled the command straight out of your tutorial. Latest git pull too. I just don’t understand why it’s failing to parse commands laid out explicitly in your tutorial.

---

<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:** [April 21, 2017, 8:07pm UTC](https://community.mrtrix.org/t/dwi2fod-busted/849/2 "2017-04-21T20:07:54Z")

</div>

Not sure what’s going on there… Everything looks fine from our side: the [current version passes its tests](https://travis-ci.org/MRtrix3/mrtrix3), and [one of these tests](https://github.com/MRtrix3/mrtrix3/blob/master/testing/tests/dwi2fod#L5) is more or less the exact same command as the one you’re having trouble with…

So not too sure what the problem is. Can you tell us what platform you’re running on, and what the output of `dwi2fod -version` reports?

---

<div class="post-metadata">

**Author:** ![Goku](https://community.mrtrix.org/user_avatar/community.mrtrix.org/goku/32/1854_2.png) [@Goku](https://community.mrtrix.org/u/Goku)\
**Post date:** [April 21, 2017, 8:23pm UTC](https://community.mrtrix.org/t/dwi2fod-busted/849/3 "2017-04-21T20:23:16Z")

</div>

Here’s the output from dwi2fod -version  
== dwi2fod 0.3.12-1056-g72603c8e ==  
64 bit release version, built Jan 18 2016, using GSL 1.16

I had to go back a Dec. 2015 release where msdwi2fod worked.

---

<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:** [April 21, 2017, 10:26pm UTC](https://community.mrtrix.org/t/dwi2fod-busted/849/4 "2017-04-21T22:26:11Z")

</div>

OK, the particular version of `dwi2fod` you’re using dates back from 11 Dec 2015 ([this commit](https://github.com/MRtrix3/mrtrix3/commit/72603c8e)) - the current version is `0.3.15-535-g21da6244`. Your version predates the changes that were made to bring the MSMT-CSD method into the `dwi2fod` command, which explains the error message.

As to why you’re using an old version despite a recent `git pull`, my guess is that your previous install used the old `PATH` setting, which used to be `{mrtrix3_folder}/bin`. This changed with version `0.3.14` so that executables are now located in `{mrtrix3_folder}/release/bin` (as detailed in [this post](https://community.mrtrix.org/t/major-update-to-mrtrix3/110) at the time). So if you haven’t updated your `PATH`, you’d still be using the executables left over from the previous installation, despite having just compiled the new ones… You should nowadays be able to use the `./set_path` command from the mrtrix3 folder to set that up correctly. I also recommend you remove the previous `export PATH=...` line from your `~/.bashrc` file to avoid further conflicts, and rely on the `./set_path` command to update it from now on. I also recommend you remove the `bin/` folder and all of its contents to make sure you genuinely are using only the most recent executables.

Incidentally, we are about to revert to the previous `PATH` location within the next few days, when we release a major update… I won’t go into the details of why these changes were made (it’s a long story), but hopefully reverting to `{mrtrix3_folder}/bin` will cause less confusion in the future - and we won’t be changing it again in a hurry…

---

<div class="post-metadata">

**Author:** ![Goku](https://community.mrtrix.org/user_avatar/community.mrtrix.org/goku/32/1854_2.png) [@Goku](https://community.mrtrix.org/u/Goku)\
**Post date:** [April 22, 2017, 4:29am UTC](https://community.mrtrix.org/t/dwi2fod-busted/849/5 "2017-04-22T04:29:19Z")

</div>

Thanks for the explanation! I’ll give that a go
