{"record":{"id":"750744e9735846cd","repo":"calesthio/OpenMontage","slug":"candidate-candidate-clip-id-has-no-download-url-750744","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/pexels.py","lineNumber":82,"sourceCode":"        out: list[Candidate] = []\n        if kind in (\"video\", \"any\"):\n            out.extend(self._search_videos(query, filters))\n        if kind in (\"image\", \"any\"):\n            out.extend(self._search_images(query, filters))\n        return out\n\n    def download(self, candidate: Candidate, out_path: Path) -> Path:\n        \"\"\"Stream the candidate's file to `out_path`.\n\n        Creates parent directories as needed. Uses streamed chunks so\n        large 1080p clips don't blow RAM. No caching — the corpus\n        builder is responsible for deciding whether to call this at\n        all.\n        \"\"\"\n        import requests  # lazy — avoid pulling requests at import time\n\n        if not candidate.download_url:\n            raise ValueError(\n                f\"Candidate {candidate.clip_id} has no download_url\"\n            )\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, stream=True, timeout=120\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    # ------------------------------------------------------------------\n    # Internals","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/stock_sources/pexels.py#L64-L100","documentation":"Error \"Candidate {candidate.clip_id} has no download_url\" thrown in calesthio/OpenMontage.","triggerScenarios":"A Pexels stock candidate is selected for download but has no download_url in its metadata.","commonSituations":"See trigger scenarios.","solutions":["Skip this candidate and pick another result that includes a download_url.","Re-query the Pexels API; video file links are normally present, so an empty one indicates a partial API response."],"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"}