Skip to content

Commit 51a7c29

Browse files
prevent error override, fix traceback type (#788)
* prevent error override, fix traceback type * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 9f668ee commit 51a7c29

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

papermill/execute.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,18 @@ def raise_for_execution_errors(nb, output_path):
215215
break
216216

217217
# handle the CellExecutionError exceptions raised that didn't produce a cell error output
218-
if not has_sys_exit and cell.get("metadata", {}).get("papermill", {}).get("exception") is True:
218+
if (
219+
error is None
220+
and not has_sys_exit
221+
and cell.get("metadata", {}).get("papermill", {}).get("exception") is True
222+
):
219223
error = PapermillExecutionError(
220224
cell_index=index,
221225
exec_count=cell.execution_count,
222226
source=cell.source,
223227
ename="CellExecutionError",
224228
evalue="",
225-
traceback="",
229+
traceback=[],
226230
)
227231
break
228232

0 commit comments

Comments
 (0)