calesthio/OpenMontage · error · ValueError

Candidate {candidate.clip_id} has no download_url

Error message

Candidate {candidate.clip_id} has no download_url

What it means

Error "Candidate {candidate.clip_id} has no download_url" thrown in calesthio/OpenMontage.

Source

Thrown at tools/video/stock_sources/nasa.py:123

        data = r.json()
        items = ((data.get("collection") or {}).get("items") or [])

        out: list[Candidate] = []
        for item in items:
            cand = self._hydrate_candidate(item, filters)
            if cand is not None:
                out.append(cand)
        return out

    def download(self, candidate: Candidate, out_path: Path) -> Path:
        """Stream the candidate's file to `out_path`.

        Same pattern as the other adapters.
        """
        import requests  # lazy

        if not candidate.download_url:
            raise ValueError(
                f"Candidate {candidate.clip_id} has no download_url"
            )

        out_path = Path(out_path)
        out_path.parent.mkdir(parents=True, exist_ok=True)

        with requests.get(
            candidate.download_url, stream=True, timeout=300
        ) as r:
            r.raise_for_status()
            with open(out_path, "wb") as f:
                for chunk in r.iter_content(chunk_size=1 << 16):
                    if chunk:
                        f.write(chunk)
        return out_path

    # ------------------------------------------------------------------
    # Internals

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Filter this candidate out and select another search result that has a download_url.
  2. Re-run the search with different keywords; NASA collection entries sometimes lack direct file links.

When it happens

Trigger: A NASA stock-footage candidate is selected for download but its metadata has no download_url.

Common situations: See trigger scenarios.


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/1528d80dfd3b7a71. Report an issue: GitHub.