diff --git a/pymead/analysis/calc_aero_data.py b/pymead/analysis/calc_aero_data.py index ed9de0e..76bac2a 100644 --- a/pymead/analysis/calc_aero_data.py +++ b/pymead/analysis/calc_aero_data.py @@ -845,8 +845,16 @@ def send_over_pipe(data: object): # Make the analysis directory if not already created base_dir = os.path.join(airfoil_coord_dir, airfoil_name) - if not os.path.exists(base_dir): - os.mkdir(base_dir) + try: + if not os.path.exists(base_dir): + os.mkdir(base_dir) + except FileNotFoundError as e: + if conn is not None: + send_over_pipe(("disp_message_box", + f"Could not find analysis base directory {mset_settings['airfoil_analysis_dir']}")) + return + else: + raise FileNotFoundError(f"Could not find analysis base directory {mset_settings['airfoil_analysis_dir']}") if tool == 'XFOIL': if xfoil_settings is None: diff --git a/pymead/gui/gui.py b/pymead/gui/gui.py index 3fe2352..c513a87 100644 --- a/pymead/gui/gui.py +++ b/pymead/gui/gui.py @@ -1843,6 +1843,8 @@ def progress_update(self, status: str, data: object): self.output_area_text(data, line_break=True) elif status == "message" and isinstance(data, str): self.message_callback_fn(data) + elif status == "disp_message_box" and isinstance(data, str): + self.disp_message_box(data) elif status == "opt_progress" and isinstance(data, dict): callback = TextCallback(parent=self, text_list=data["text"], completed=data["completed"], warm_start_gen=data["warm_start_gen"])