# Dwifslpreproc error on a cluster

**URL:** https://community.mrtrix.org/t/dwifslpreproc-error-on-a-cluster/4144
**Category:** Development
**Created:** [October 1, 2020, 10:55am UTC](https://community.mrtrix.org/t/dwifslpreproc-error-on-a-cluster/4144 "2020-10-01T10:55:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![treanus](https://community.mrtrix.org/user_avatar/community.mrtrix.org/treanus/32/3146_2.png) [@treanus](https://community.mrtrix.org/u/treanus)
#### Post date: [October 1, 2020, 10:55am UTC](https://community.mrtrix.org/t/dwifslpreproc-error-on-a-cluster/4144/1 "2020-10-01T10:55:16Z")

</div>

Hi, I’m using mrtrix on a hpc.  
Run into the error below when eddy\_cuda fails (which is expected since I’m not on a GPU node) and should continue to eddy\_openmp.

Any suggestions for a fix?

Thanks in advance!

```auto
Command: eddy_cuda9.1 --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --cnr_maps --residuals --slm=linear --repol --out=dwi_post_eddy --verbose

dwifslpreproc: [ERROR] Unhandled Python exception:
dwifslpreproc: [ERROR] UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 75: ordinal not in range(128)
dwifslpreproc: [ERROR] Traceback:
dwifslpreproc: [ERROR] /vsc-hard-mounts/leuven-data/329/vsc32905/apps/mrtrix3/bin/dwifslpreproc:914 (in execute())
dwifslpreproc: [ERROR] eddy_output_file.write(str(exception_cuda))

```

---

<div class="post-metadata">

### Author: ![treanus](https://community.mrtrix.org/user_avatar/community.mrtrix.org/treanus/32/3146_2.png) [@treanus](https://community.mrtrix.org/u/treanus)
#### Post date: [October 2, 2020, 5:05pm UTC](https://community.mrtrix.org/t/dwifslpreproc-error-on-a-cluster/4144/2 "2020-10-02T17:05:31Z")

</div>

I found a fix and share it with you.

This has to do with how python v2 and v3 differently handle unicode/ascii.

On the hpc, loading python3 fixed to error.

So, I believe it is a python 2.7 incompatibility.

Best regards,

Stefan Sunaert

---

<div class="post-metadata">

### Author: ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)
#### Post date: [October 8, 2020, 5:08am UTC](https://community.mrtrix.org/t/dwifslpreproc-error-on-a-cluster/4144/3 "2020-10-08T05:08:40Z")

</div>

For anyone interested in this issue / thread, there is further information [over on GitHub](https://github.com/MRtrix3/mrtrix3/issues/2190).

---

<div class="post-metadata">

### Author: ![stevejonn](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@stevejonn](https://community.mrtrix.org/u/stevejonn)
#### Post date: [April 12, 2021, 6:10pm UTC](https://community.mrtrix.org/t/dwifslpreproc-error-on-a-cluster/4144/4 "2021-04-12T18:10:48Z")

</div>

> [@treanus](#):
>
> `'ascii' codec can't encode character`

To use a specific encoding (e.g. ‘utf-8’) use the encoding argument for [pandas to csv](http://net-informations.com/ds/pd/tocsv.htm):

`df.to_csv(file_name, sep='\t', encoding='utf-8')`
