nipype
nipype copied to clipboard
Error using fsl.EDDY
trafficstars
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
Could you please help me to debugg the EDDY function ?
Can you print(eddy.cmdline) and then try running the result yourself, and see what you get?