diff --git a/src/aihawk_job_manager.py b/src/aihawk_job_manager.py index c87c61ea5..29c574e6f 100644 --- a/src/aihawk_job_manager.py +++ b/src/aihawk_job_manager.py @@ -513,6 +513,10 @@ def is_previously_failed_to_apply(self, link): file_name = "failed" file_path = self.output_file_directory / f"{file_name}.json" + if not file_path.exists(): + with open(file_path, "w", encoding="utf-8") as f: + json.dump([], f) + with open(file_path, 'r', encoding='utf-8') as f: try: existing_data = json.load(f)