diff --git a/tsadar/process/prepare.py b/tsadar/process/prepare.py index e6a45dd..387b880 100644 --- a/tsadar/process/prepare.py +++ b/tsadar/process/prepare.py @@ -22,9 +22,12 @@ def prepare_data(config: Dict) -> Dict: """ # load data - custom_path = (config["data"]["filenames"]["epw"] is not None) | (config["data"]["filenames"]["iaw"] is not None) - if custom_path: - custom_path = os.path.dirname(config["data"]["filenames"]["epw"]) + if "filenames" in config["data"].keys(): + custom_path = (config["data"]["filenames"]["epw"] is not None) | ( + config["data"]["filenames"]["iaw"] is not None + ) + if custom_path: + custom_path = os.path.dirname(config["data"]["filenames"]["epw"]) [elecData, ionData, xlab, config["other"]["extraoptions"]["spectype"]] = loadData( config["data"]["shotnum"], config["data"]["shotDay"], config["other"]["extraoptions"], custom_path=custom_path