Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using fsl.EDDY #3581

Open
DavidBarriere opened this issue Jun 21, 2023 · 2 comments
Open

Error using fsl.EDDY #3581

DavidBarriere opened this issue Jun 21, 2023 · 2 comments

Comments

@DavidBarriere
Copy link

DavidBarriere commented Jun 21, 2023

Summary

EDDY current and motion correction of dw data.

Actual behavior

Expected behavior

How to replicate the behavior

Script/Workflow details

eddy = fsl.Eddy(in_file = 'dwi_denoised.nii.gz',
                in_mask  = 'dw_01_mask.nii.gz',
                in_index = 'index.txt',
                in_acqp  = 'topup_parameters_dw.txt',
                in_topup_fieldcoef = "TopUp_results_fieldcoef.nii.gz",
                in_topup_movpar = 'TopUp_results_movpar.txt',
                in_bvec  = 'dw_01.bvec',
                in_bval  = 'dw_01.bval')
eddy.run()

Platform details:

230621-11:14:36,530 nipype.interface INFO:
	 stdout 2023-06-21T11:14:36.530774:
---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
Input In [70], in <cell line: 13>()
      2 os.chdir(data_path)
      5 eddy = fsl.Eddy(in_file = 'dwi_denoised.nii.gz',
      6                 in_mask  = 'dw_01_mask.nii.gz',
      7                 in_index = 'index_6.txt',
   (...)
     11                 in_bvec  = 'dw_01.bvec',
     12                 in_bval  = 'dw_01.bval')
---> 13 eddy.run()
     15 print('Elapsed time:',timeit.timeit())

File ~/.local/lib/python3.8/site-packages/nipype/interfaces/base/core.py:398, in BaseInterface.run(self, cwd, ignore_exception, **inputs)
    396 # Run interface
    397 runtime = self._pre_run_hook(runtime)
--> 398 runtime = self._run_interface(runtime)
    399 runtime = self._post_run_hook(runtime)
    400 # Collect outputs

File ~/.local/lib/python3.8/site-packages/nipype/interfaces/fsl/epi.py:993, in Eddy._run_interface(self, runtime)
    985 if all(
    986     (
    987         FSLDIR != "",
   (...)
    990     )
    991 ):
    992     self._cmd = "eddy"
--> 993 runtime = super(Eddy, self)._run_interface(runtime)
    995 # Restore command to avoid side-effects
    996 self._cmd = cmd

File ~/.local/lib/python3.8/site-packages/nipype/interfaces/base/core.py:765, in CommandLine._run_interface(self, runtime, correct_return_codes)
    759 runtime.command_path = cmd_path
    760 runtime.dependencies = (
    761     get_dependencies(executable_name, runtime.environ)
    762     if self._ldd
    763     else "<skipped>"
    764 )
--> 765 runtime = run_command(
    766     runtime,
    767     output=self.terminal_output,
    768     write_cmdline=self.write_cmdline,
    769 )
    770 return runtime

File ~/.local/lib/python3.8/site-packages/nipype/utils/subprocess.py:141, in run_command(runtime, output, timeout, write_cmdline)
    139 while proc.returncode is None:
    140     proc.poll()
--> 141     _process()
    143 _process(drain=1)
    145 # collect results, merge and return

File ~/.local/lib/python3.8/site-packages/nipype/utils/subprocess.py:137, in run_command.<locals>._process(drain)
    135 else:
    136     for stream in res[0]:
--> 137         stream.read(drain)

File ~/.local/lib/python3.8/site-packages/nipype/utils/subprocess.py:42, in Stream.read(self, drain)
     40 def read(self, drain=0):
     41     "Read from the file descriptor. If 'drain' set, read until EOF."
---> 42     while self._read(drain) is not None:
     43         if not drain:
     44             break

File ~/.local/lib/python3.8/site-packages/nipype/utils/subprocess.py:49, in Stream._read(self, drain)
     47 "Read from the file descriptor"
     48 fd = self.fileno()
---> 49 buf = os.read(fd, 4096).decode(self.default_encoding)
     50 if not buf and not self._buf:
     51     return None

**UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd in position 1: invalid continuation byte**
-->

Execution environment

Ubuntu 20.04
NIPYPE : 1.8.4
FSL : 6.0.6.5
Python 3.8.10

@DavidBarriere
Copy link
Author

Could you please help me to debugg the EDDY function ?

@effigies
Copy link
Member

effigies commented Jul 5, 2023

Can you print(eddy.cmdline) and then try running the result yourself, and see what you get?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants