{"record":{"id":"e44c957569e1e8fd","repo":"calesthio/OpenMontage","slug":"candidate-candidate-clip-id-has-no-download-url-e44c95","errorCode":null,"errorMessage":"Candidate {candidate.clip_id} has no download_url","messagePattern":"Candidate (.+?) has no download_url","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/stock_sources/wikimedia.py","lineNumber":115,"sourceCode":"            if not pages:\n                continue\n            pages.sort(key=lambda page: int(page.get(\"index\", 0)))\n\n            out: list[Candidate] = []\n            for page in pages:\n                cand = _page_to_candidate(page, filters)\n                if cand is not None:\n                    out.append(cand)\n            if out:\n                return out\n\n        return []\n\n    def download(self, candidate: Candidate, out_path: Path) -> Path:\n        import requests  # lazy\n\n        if not candidate.download_url:\n            raise ValueError(f\"Candidate {candidate.clip_id} has no download_url\")\n\n        out_path = Path(out_path)\n        out_path.parent.mkdir(parents=True, exist_ok=True)\n\n        with requests.get(\n            candidate.download_url,\n            stream=True,\n            timeout=300,\n            headers={\"User-Agent\": _USER_AGENT},\n        ) as r:\n            r.raise_for_status()\n            with open(out_path, \"wb\") as f:\n                for chunk in r.iter_content(chunk_size=1 << 16):\n                    if chunk:\n                        f.write(chunk)\n        return out_path\n\n","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/stock_sources/wikimedia.py#L97-L133","documentation":"Error \"Candidate {candidate.clip_id} has no download_url\" thrown in calesthio/OpenMontage.","triggerScenarios":"A Wikimedia stock candidate is selected for download but has no download_url in its metadata.","commonSituations":"See trigger scenarios.","solutions":["Pick another Wikimedia candidate that exposes a direct file URL.","Visit the file's description page on Wikimedia Commons and copy the original file URL manually."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}