# Dwifslpreproc: \[ERROR\] Unhandled Python exception:

**URL:** <https://community.mrtrix.org/t/dwifslpreproc-error-unhandled-python-exception/7824>\
**Category:** Uncategorized\
**Created:** [July 23, 2024, 8:37am UTC](https://community.mrtrix.org/t/dwifslpreproc-error-unhandled-python-exception/7824 "2024-07-23T08:37:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tutuzhu](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@tutuzhu](https://community.mrtrix.org/u/tutuzhu)\
**Post date:** [July 23, 2024, 8:37am UTC](https://community.mrtrix.org/t/dwifslpreproc-error-unhandled-python-exception/7824/1 "2024-07-23T08:37:37Z")

</div>

dwifslpreproc degibbs.mif geomcorr.mif -pe\_dir PA -rpe\_pair -se\_epi b0\_pair.mif -eddy\_options “–data\_is\_shelled --slm=linear --niter=5” -force  
dwifslpreproc:  
dwifslpreproc: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.  
dwifslpreproc:

dwifslpreproc: [ERROR] Unhandled Python exception:  
dwifslpreproc: [ERROR] ImportError: libffi.so.6: cannot open shared object file: No such file or directory  
dwifslpreproc: [ERROR] Traceback:  
dwifslpreproc: [ERROR] /home/qq/mrtrix3/bin/dwifslpreproc:90 (in execute())  
dwifslpreproc: [ERROR] from mrtrix3 import app, fsl, image, matrix, path, phaseencoding, run, utils #pylint: disable=no-name-in-module, import-outside-toplevel  
dwifslpreproc: [ERROR] /home/qq/mrtrix3/lib/mrtrix3/path.py:23 (in ())  
dwifslpreproc: [ERROR] import ctypes, errno, inspect, os, random, string, subprocess, time  
dwifslpreproc: [ERROR] /home/qq/.pyenv/versions/3.7.4/lib/python3.7/ctypes/ **init**.py:7 (in ())  
dwifslpreproc: [ERROR] from \_ctypes import Union, Structure, Array

Thanks in advance for the suggestion!

---

<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:** [July 23, 2024, 9:22am UTC](https://community.mrtrix.org/t/dwifslpreproc-error-unhandled-python-exception/7824/2 "2024-07-23T09:22:56Z")

</div>

Hi @tutuzhu,

This is an error coming from Python, rather than MRtrix as such. This is most likely due to conflicts in the various python modules present. The relevant error message is:

> [@tutuzhu](#):
>
> ImportError: libffi.so.6: cannot open shared object file: No such file or directory

If you search for that error online, you’ll find it affects a lot of people in lots of different contexts, such as this one:

> <https://stackoverflow.com/questions/61875869/ubuntu-20-04-upgrade-python-missing-libffi-so-6>

Hopefully that’ll point you in the right direction…

All the best,  
Donald.

---

<div class="post-metadata">

**Author:** ![tutuzhu](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@tutuzhu](https://community.mrtrix.org/u/tutuzhu)\
**Post date:** [July 24, 2024, 7:25am UTC](https://community.mrtrix.org/t/dwifslpreproc-error-unhandled-python-exception/7824/3 "2024-07-24T07:25:36Z")

</div>

> [@jdtournier](#):
>
> Donald

Hi Donald,  
Thank you for the prompt response.
