calesthio/OpenMontage · error · RuntimeError

NOAA download failed for {detail_url}: {e}

Error message

NOAA download failed for {detail_url}: {e}

What it means

Error "NOAA download failed for {detail_url}: {e}" thrown in calesthio/OpenMontage.

Source

Thrown at tools/video/stock_sources/noaa.py:183

            # Look for YouTube embeds
            if not download_url:
                for iframe in soup.select("iframe[src]"):
                    src = iframe.get("src", "")
                    if "youtube" in src or "vimeo" in src:
                        _log.warning("NOAA video is embedded from %s — cannot download directly", src)
                        raise ValueError(f"Video is embedded from external platform: {src}")

            if not download_url:
                raise ValueError(f"Could not find video URL on NOAA page: {detail_url}")

            if not download_url.startswith("http"):
                download_url = f"https://www.noaa.gov{download_url}"

            return self._stream_download(download_url, out_path)

        except Exception as e:
            raise RuntimeError(f"NOAA download failed for {detail_url}: {e}") from e

    def _stream_download(self, url: str, out_path: Path) -> Path:
        import requests

        with requests.get(
            url, stream=True, timeout=180,
            headers={"User-Agent": "OpenMontage/1.0"},
        ) 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. Retry the download; if it fails again, fetch the file manually from the detail page.
  2. Check network access to the NOAA host — some CDNs block non-browser user agents.

When it happens

Trigger: The HTTP download of a NOAA stock clip fails with a network or response error.

Common situations: See trigger scenarios.


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