diff --git a/modules/Workflow/whale/main.py b/modules/Workflow/whale/main.py index e3647d5e1..2fea0757b 100644 --- a/modules/Workflow/whale/main.py +++ b/modules/Workflow/whale/main.py @@ -2575,6 +2575,14 @@ def simulate_response(self, AIM_file_path='AIM.json', asst_id=None): # noqa: C9 os.chdir(asst_id) try: + + + # Open the file and count the number of lines (rows) + with open('dakotaTab.out', 'r') as file: + num_rows = sum(1 for line in file) + if num_rows<2: + raise RuntimeError(f"dakotaTab.out is empty") + # sy, abs - added try-statement because dakota-reliability does not write DakotaTab.out dakota_out = pd.read_csv( 'dakotaTab.out', sep=r'\s+', header=0, index_col=0