diff --git a/src/ert/run_models/base_run_model.py b/src/ert/run_models/base_run_model.py index bd6392647de..42fa260dad9 100644 --- a/src/ert/run_models/base_run_model.py +++ b/src/ert/run_models/base_run_model.py @@ -7,6 +7,7 @@ import os import shutil import time +import traceback import uuid from abc import ABC, abstractmethod from collections import defaultdict @@ -212,6 +213,8 @@ def group(cls) -> str | None: return None def send_event(self, event: StatusEvents) -> None: + traceback.print_stack() + print(event.error_msg) self._status_queue.put(event) def send_smoother_event( diff --git a/tests/ert/ui_tests/cli/test_cli.py b/tests/ert/ui_tests/cli/test_cli.py index 65f8e357700..72a9afe3688 100644 --- a/tests/ert/ui_tests/cli/test_cli.py +++ b/tests/ert/ui_tests/cli/test_cli.py @@ -4,6 +4,7 @@ import logging import os import threading +import traceback from datetime import datetime from pathlib import Path from textwrap import dedent @@ -614,7 +615,13 @@ def test_that_pre_post_experiment_hook_works(capsys): ) for mode in [ITERATIVE_ENSEMBLE_SMOOTHER_MODE, ES_MDA_MODE, ENSEMBLE_SMOOTHER_MODE]: - run_cli(mode, "--disable-monitor", "poly.ert") + try: + run_cli(mode, "--disable-monitor", "poly.ert") + except Exception as e: + print(f"{mode}") + print(traceback.format_exc()) + print("\n".join(traceback.format_tb(e.__traceback__))) + print(str(e.__traceback__)) captured = capsys.readouterr() assert "first" in captured.out