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
FileNotFoundErrorrelated to the backup directory. - The
Gmeek.pyscript creates thebackupdirectory if missing.
Context
See failing job logs for details.