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/wikimedia.py:115

            if not pages:
                continue
            pages.sort(key=lambda page: int(page.get("index", 0)))

            out: list[Candidate] = []
            for page in pages:
                cand = _page_to_candidate(page, filters)
                if cand is not None:
                    out.append(cand)
            if out:
                return out

        return []

    def download(self, candidate: Candidate, out_path: Path) -> Path:
        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,
            headers={"User-Agent": _USER_AGENT},
        ) 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

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Pick another Wikimedia candidate that exposes a direct file URL.
  2. Visit the file's description page on Wikimedia Commons and copy the original file URL manually.

When it happens

Trigger: A Wikimedia stock candidate is selected for download but has no download_url in its metadata.

Common situations: See trigger scenarios.


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