diff --git a/nbrunner/nb_runner.py b/nbrunner/nb_runner.py index b5f7503..fcf7983 100644 --- a/nbrunner/nb_runner.py +++ b/nbrunner/nb_runner.py @@ -1,5 +1,6 @@ import glob import os +import traceback import uuid from pathlib import Path from typing import Optional, Set @@ -56,9 +57,9 @@ def execute_notebook(self, run_id, notebook_path): ) try: out = ep.preprocess(nb, {"metadata": {"path": notebook_path.parent}}) - except (CellExecutionError, CellTimeoutError) as e: + except (CellExecutionError, CellTimeoutError): print(f"=> Error during {run_id}; check {output_filename} for details") - print(e.traceback) + print(traceback.print_exc()) out = None finally: with open(output_filename, mode="w", encoding="utf-8") as f: