Skip to content

Commit ac0c5ef

Browse files
author
Shoshana Berleant
committed
minor improvements to error reporting
1 parent 993235f commit ac0c5ef

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

nipype/algorithms/rapidart.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None):
362362
nim = funcs.concat_images(images)
363363

364364
# compute global intensity signal
365-
(x, y, z, timepoints) = nim.shape
365+
try:
366+
(x, y, z, timepoints) = nim.shape
367+
except ValueError as ve:
368+
raise NipypeInterfaceError(ve, 'Check dimensions of input image; 4-D input required.')
366369

367370
data = nim.get_data()
368371
affine = nim.affine

nipype/interfaces/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ def run(self, **inputs):
10561056

10571057
if config.has_option('logging', 'interface_level') and \
10581058
config.get('logging', 'interface_level').lower() == 'debug':
1059-
inputs_str = "Inputs:" + str(self.inputs) + "\n"
1059+
inputs_str = "\nInputs:" + str(self.inputs) + "\n"
10601060
else:
10611061
inputs_str = ''
10621062

0 commit comments

Comments
 (0)