Problem
Workflow fails with the error:
FileNotFoundError: [Errno 2] No such file or directory: 'backup/11.md'
This occurs because the code in Gmeek.py attempts to write to the backup directory without first ensuring the directory exists, causing workflow failures during the "Generate new html" step.
Solution
Update Gmeek.py, in the addOnePostJson method, to add the following line before opening or writing backup files:
import os
os.makedirs(self.backup_dir, exist_ok=True)
This creates the backup folder if it does not already exist, preventing the FileNotFoundError.
Acceptance Criteria
- The workflow no longer fails with
FileNotFoundError related to the backup directory.
- The
Gmeek.py script creates the backup directory if missing.
Context
See failing job logs for details.
Problem
Workflow fails with the error:
This occurs because the code in
Gmeek.pyattempts to write to thebackupdirectory without first ensuring the directory exists, causing workflow failures during the "Generate new html" step.Solution
Update
Gmeek.py, in theaddOnePostJsonmethod, to add the following line before opening or writing backup files:This creates the
backupfolder if it does not already exist, preventing the FileNotFoundError.Acceptance Criteria
FileNotFoundErrorrelated to the backup directory.Gmeek.pyscript creates thebackupdirectory if missing.Context
See failing job logs for details.