From 9efd7008b5ed274339745b3ee00a19e6321aab48 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Thu, 14 Dec 2023 15:35:50 +0000 Subject: [PATCH] added error message for incorrect dpi. --- bgcval2/analysis_compare.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bgcval2/analysis_compare.py b/bgcval2/analysis_compare.py index c19b7ec0..9c3d5c6e 100755 --- a/bgcval2/analysis_compare.py +++ b/bgcval2/analysis_compare.py @@ -514,6 +514,12 @@ def load_comparison_yml(master_compare_yml_fn): details['dpi'] = input_yml_dict.get('dpi', None) details['savepdf'] = input_yml_dict.get('savepdf', False) + try: + int(details['dpi']) + except: + raise ValueError(''.join(["Loading yml error: `dpi` needs to be an integer. Current value:", + str(details['dpi'])])) + # auto download, can differ for each job. auto_download = input_yml_dict.get('auto_download', True) auto_download_dict = {jobID: auto_download for jobID in details['jobs'].keys()}