Skip to content

Commit

Permalink
prevent error override, fix traceback type (#788)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
mbektas and pre-commit-ci[bot] authored Apr 2, 2024
1 parent 9f668ee commit 51a7c29
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions papermill/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,18 @@ def raise_for_execution_errors(nb, output_path):
break

# handle the CellExecutionError exceptions raised that didn't produce a cell error output
if not has_sys_exit and cell.get("metadata", {}).get("papermill", {}).get("exception") is True:
if (
error is None
and not has_sys_exit
and cell.get("metadata", {}).get("papermill", {}).get("exception") is True
):
error = PapermillExecutionError(
cell_index=index,
exec_count=cell.execution_count,
source=cell.source,
ename="CellExecutionError",
evalue="",
traceback="",
traceback=[],
)
break

Expand Down

0 comments on commit 51a7c29

Please sign in to comment.