# Dwifslpreproc Fails with EDDY::: Eddy failed with message Error

**URL:** https://community.mrtrix.org/t/dwifslpreproc-fails-with-eddy-eddy-failed-with-message-error/6930
**Category:** Uncategorized
**Tags:** error, preprocessing
**Created:** [September 5, 2023, 7:39pm UTC](https://community.mrtrix.org/t/dwifslpreproc-fails-with-eddy-eddy-failed-with-message-error/6930 "2023-09-05T19:39:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shai\_P](https://community.mrtrix.org/user_avatar/community.mrtrix.org/shai_p/32/3289_2.png) [@Shai\_P](https://community.mrtrix.org/u/Shai_P)
#### Post date: [September 5, 2023, 7:39pm UTC](https://community.mrtrix.org/t/dwifslpreproc-fails-with-eddy-eddy-failed-with-message-error/6930/1 "2023-09-05T19:39:50Z")

</div>

Hello everyone,

I am experiencing an issue while running the `dwifslpreproc` script on my dataset. The process appears to be running fine until it reaches the `eddy_cpu` command, after which it fails with a vague error message “EDDY::: Eddy failed with message.”

#### Software Versions:

- MRTRIX3: `== mrinfo 3.0.4 == 64 bit release version, built Dec 14 2022, using Eigen 3.4.0`
- FSL: `FLIRT version 6.0`
- Operating System: macOS; Apple M1 Max; 32GB Memory; Ventura 13.5.1

#### Steps:

1. I started by running the `dwifslpreproc` command as follows:

```auto
dwifslpreproc dwi_unringed.mif dwi_preprocessed.mif -rpe_header -pe_dir AP -eddy_options " --slm=linear --verbose"

```

1. The script proceeds through several steps like loading headers, executing `topup`, etc., until it fails at the `eddy_cpu` command.

#### Error Message:

The error message I received is as follows:

```auto
dwifslpreproc: [ERROR] eddy_cpu --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --slm=linear --verbose --out=dwi_post_eddy --verbose (dwifslpreproc:972)
dwifslpreproc: [ERROR] Information from failed command:
dwifslpreproc:
               Reading images
               �O�N��
               
               EDDY::: Eddy failed with message

```

#### Additional Information:

- The `dwi_unringed.mif` was generated from DICOMs using `dcm2niix` and further processed using `dwidenoise` and `mrdegibbs`.
- The `b0_AP_PA.mif` used in `dwifslpreproc` is an average of B0s from both the AP and PA directions.
- The shell indices and b-values show the following:
  - Shell Indices:

```auto
dwifslpreproc: Result: 0,45,91,92 46,47,93,94,138,139 1,2,3,4,5,6,7,48,49,50,51,52,53,54,95,96,97,98,99,100 8,9,10,11,12,13,14,55,56,57,58,59,60,101,102,103,104,105,106,107 15,16,17,18,19,20,21,22,23,24,61,62,63,64,65,66,67,68,69,70,108,109,110,111,112,113,114,115,116,117 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137

```

- Shell B-values: 0 250 1000 1500 2000 2500

I would really appreciate any guidance or suggestions to resolve this issue.

Thank you!

---

<div class="post-metadata">

### Author: ![archithrajan1](https://community.mrtrix.org/user_avatar/community.mrtrix.org/archithrajan1/32/4245_2.png) [@archithrajan1](https://community.mrtrix.org/u/archithrajan1)
#### Post date: [September 6, 2023, 3:15am UTC](https://community.mrtrix.org/t/dwifslpreproc-fails-with-eddy-eddy-failed-with-message-error/6930/2 "2023-09-06T03:15:52Z")

</div>

Hi Shai,

Not a solution,but a suggestion: Had encountered a similar problem,and in my specific case,was a problem with how the indices.txt was created.

Regards,  
Archith

---

<div class="post-metadata">

### Author: ![Shai\_P](https://community.mrtrix.org/user_avatar/community.mrtrix.org/shai_p/32/3289_2.png) [@Shai\_P](https://community.mrtrix.org/u/Shai_P)
#### Post date: [September 22, 2023, 12:07am UTC](https://community.mrtrix.org/t/dwifslpreproc-fails-with-eddy-eddy-failed-with-message-error/6930/3 "2023-09-22T00:07:29Z")

</div>

@archithrajan1 Thanks. I think it may be a similar case for me. How did you specify the dwifslpreproc command to include the correct `indicies.txt` file?

I’m trying:

```auto
dwifslpreproc DKI_all_unringed.mif DKI_all_eddy_corrected.mif -pe_dir ap -rpe_pair -se_epi b0_pair.mif -fslgrad bvecs.txt bvals.txt -eddy_options " --slm=linear --index=/path/to/index.txt"

```

but it still creates its own `indecies.txt` file in the tmp folder

---

<div class="post-metadata">

### Author: ![archithrajan1](https://community.mrtrix.org/user_avatar/community.mrtrix.org/archithrajan1/32/4245_2.png) [@archithrajan1](https://community.mrtrix.org/u/archithrajan1)
#### Post date: [September 22, 2023, 1:26am UTC](https://community.mrtrix.org/t/dwifslpreproc-fails-with-eddy-eddy-failed-with-message-error/6930/4 "2023-09-22T01:26:42Z")

</div>

Hi Shai,

I think I did the same thing.But in my specific case, text file genereted from notepad in windows didn’t work, but with gedit (in Ubuntu WSL) worked.Again, Id like to put in a disclaimer that it was a specific issue, and not likely to be a solution.

Regards,  
Archith
