{"record":{"id":"726805d7c834ec01","repo":"affaan-m/ECC","slug":"filenotfounderror-path","errorCode":null,"errorMessage":"FileNotFoundError: {path}","messagePattern":"FileNotFoundError: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/tasteforge/workflow.py","lineNumber":569,"sourceCode":"    specs: list[dict[str, Any]] = []\n    manifests: dict[str, dict[str, Any]] = {\n        modality: {\n            \"schema_version\": 1,\n            \"modality\": modality,\n            \"dry_run\": True,\n            \"submit\": False,\n            \"provider_calls\": 0,\n            \"provider_execution\": False,\n            \"requests\": [],\n        }\n        for modality in _MODALITIES\n    }\n    provenance_rules: list[dict[str, Any]] = []\n    evidence_files: list[dict[str, Any]] = []\n    for raw_path in config.get(\"evidence_files\", []):\n        path = resolve_input(raw_path)\n        if not path.is_file():\n            raise FileNotFoundError(path)\n        suffix = path.suffix.lower()\n        evidence_files.append({\n            \"path\": str(path),\n            \"bytes\": path.stat().st_size,\n            \"sha256\": _sha256(path),\n            \"kind\": (\n                \"editorial\" if suffix in {\".edl\", \".fcpxml\"}\n                else \"archive\" if suffix == \".zip\"\n                else \"workflow_record\"\n            ),\n        })\n\n    for genre in genres:\n        genre_refs: list[dict[str, Any]] = []\n        for raw_path in genre.get(\"references\", []):\n            path = resolve_input(raw_path)\n            if not path.is_file():\n                raise FileNotFoundError(path)","sourceCodeStart":551,"sourceCodeEnd":587,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/tasteforge/workflow.py#L551-L587","documentation":"For every path listed in config['evidence_files'], run_workflow resolves it via resolve_input and requires it to be an existing regular file (path.is_file()). If the resolved path does not exist or is a directory/symlink-to-nothing, FileNotFoundError is raised with the path. Evidence files are hashed and probed, so they must be readable files.","triggerScenarios":"config['evidence_files'] contains a path that does not exist on disk, points to a directory, or is a broken symlink, after resolve_input processing.","commonSituations":"Evidence file moved or deleted after the config was written; relative path resolved against a different working directory than expected; typo in filename or extension; passing a directory instead of a file.","solutions":["Check the file exists at the exact resolved path: ls the path from config['evidence_files']","Confirm the working directory / resolve_input base path matches where evidence files actually live","Correct typos in the evidence path in the workflow config","Replace directory entries with the actual file paths inside that directory"],"exampleFix":"// before\nevidence_files = ['out/collateral/report']\n// after\nevidence_files = ['out/collateral/report.pdf']","handlingStrategy":"validation","validationCode":"from pathlib import Path\nfor raw in config.get('evidence_files', []):\n    p = Path(raw)\n    if not p.is_file():\n        raise FileNotFoundError(f'evidence file missing: {p.resolve()}')","typeGuard":"def evidence_files_exist(config) -> bool:\n    return all(Path(p).is_file() for p in config.get('evidence_files', []))","tryCatchPattern":"try:\n    run_workflow(config, out_dir)\nexcept FileNotFoundError as e:\n    print(f'Evidence file not found: {e.filename}; check paths and working directory')","preventionTips":["Use absolute paths in configs or resolve relative to the config file location","Re-validate evidence paths at config generation time, not just at run time","Watch for files deleted between config creation and run (CI artifact lifetime)"],"tags":["file-io","path","filenotfound"],"backgroundTag":"file-not-found","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}