Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit831c597

Browse files
committed
FIX: Be more forgiving of the exception type
Nipype changed how it reports exceptions raised in nodes in 1.7.0
1 parentec85d5a commit831c597

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎notebooks/basic_function_interface.ipynb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@
247247
"# Run node\n",
248248
"try:\n",
249249
" rndArray.run()\n",
250-
"except(NameError) as err:\n",
251-
" print(\"NameError:\",err)\n",
250+
"except Exception as err:\n",
251+
" print(err)\n",
252252
"else:\n",
253253
" raise"
254254
]
@@ -259,8 +259,12 @@
259259
"source": [
260260
"As you can see, if we don't import `random` inside the scope of the function, we receive the following error:\n",
261261
"\n",
262-
" NameError: global name 'random' is not defined\n",
263-
" Interface Function failed to run."
262+
" Exception raised while executing Node rndArray_node.\n",
263+
"\n",
264+
" Traceback (most recent call last):\n",
265+
" [...]\n",
266+
" File\"<string>\", line 3, in get_random_array\n",
267+
" NameError: name 'random' is not defined"
264268
]
265269
}
266270
],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp