{"record":{"id":"c30f6504b8d9159b","repo":"calesthio/OpenMontage","slug":"candidate-candidate-clip-id-has-no-download-url-c30f65","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/unsplash.py","lineNumber":76,"sourceCode":"            headers=self._headers(),\n            timeout=30,\n        )\n        r.raise_for_status()\n        data = r.json()\n        results = data.get(\"results\") or []\n\n        out: list[Candidate] = []\n        for photo in results:\n            cand = _photo_to_candidate(photo, filters)\n            if cand is not None:\n                out.append(cand)\n        return out\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=180,\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    def _headers(self) -> dict[str, str]:","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/stock_sources/unsplash.py#L58-L94","documentation":"Error \"Candidate {candidate.clip_id} has no download_url\" thrown in calesthio/OpenMontage.","triggerScenarios":"An Unsplash stock candidate is selected for download but has no download_url in its metadata.","commonSituations":"See trigger scenarios.","solutions":["Select a different candidate that has a download_url.","Re-run the Unsplash search; entries without download links usually indicate an incomplete 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"}