Skip to content

Commit 56e1331

Browse files
committed
Added pandas try except before execution
1 parent 8c0626c commit 56e1331

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nipype/algorithms/misc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,11 @@ def __init__(self, infields=None, force_run=True, **kwargs):
12011201
self._always_run = True
12021202

12031203
def _run_interface(self, runtime):
1204-
import pandas as pd
1204+
try:
1205+
import pandas as pd
1206+
except ImportError:
1207+
raise ImportError('This interface requires pandas (http://pandas.pydata.org/) to run.')
1208+
12051209

12061210
input_dict = {}
12071211

0 commit comments

Comments
 (0)