calesthio/OpenMontage · error · RuntimeError
No audio URL found for the selected track.
Error message
No audio URL found for the selected track.
What it means
Raised by PixabayTool._download when the track dict selected for download has no 'audio_url' key. Tracks are harvested by scraping Pixabay search pages, so the URL depends entirely on the page's current HTML/DOM structure. If Pixabay changes markup or the scraper's regex misses, tracks enter the list with audio_url=None and download is impossible.
Source
Thrown at tools/audio/pixabay_music.py:327
)
seen: set[str] = set()
for url in mp3_urls:
if url not in seen:
seen.add(url)
tracks.append({
"title": "Unknown",
"audio_url": url,
"duration": None,
"artist": "Unknown",
})
return tracks
def _download(self, track: dict, inputs: dict[str, Any]) -> Path:
"""Download an MP3 track to the output path."""
audio_url = track.get("audio_url")
if not audio_url:
raise RuntimeError("No audio URL found for the selected track.")
# Ensure URL is absolute
if audio_url.startswith("//"):
audio_url = "https:" + audio_url
elif audio_url.startswith("/"):
audio_url = "https://pixabay.com" + audio_url
# Build output path
track_title = track.get("title", "pixabay_music")
safe_title = "".join(
c if c.isalnum() or c in "._- " else "_" for c in track_title
)
default_filename = f"pixabay_music_{safe_title[:60]}.mp3"
output_path = Path(inputs.get("output_path", default_filename))
output_path.parent.mkdir(parents=True, exist_ok=True)
request = urllib.request.Request(
audio_url,View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Re-run the search step so track metadata is freshly scraped, then pick a track whose audio_url is populated.
- Log or inspect the scraped track list (titles like 'Unknown' and missing durations are tell-tale signs the scraper broke) and choose another entry.
- If all entries lack audio_url, the Pixabay page structure changed: update the extraction logic in the _search method to the new markup.
- Fall back to a different music provider tool (e.g. suno_music or the HeyGen audio library) until the scraper is fixed.
Example fix
// before
track = tracks[inputs["track_index"]]
path = tool._download(track, inputs) # RuntimeError: no audio_url
// after
track = tracks[inputs["track_index"]]
if not track.get("audio_url"):
tracks = [t for t in tracks if t.get("audio_url")]
if not tracks:
raise RuntimeError("Pixabay scraper returned no playable tracks; page layout likely changed")
track = tracks[0]
path = tool._download(track, inputs) Defensive patterns
Strategy: validation
Validate before calling
track = tracks[selection]
if not track.get("audio_url"):
playable = [i for i, t in enumerate(tracks) if t.get("audio_url")]
if not playable:
raise RuntimeError("Pixabay scraper returned no playable tracks")
selection = playable[0]
track = tracks[selection] Type guard
def has_audio_url(track: dict) -> bool:
url = track.get("audio_url")
return isinstance(url, str) and url.startswith(("http", "//", "/")) Try / catch
try:
path = tool._download(track, inputs)
except RuntimeError as e:
if "No audio URL" in str(e):
# re-search and pick a track with a populated audio_url
raise Prevention
- Filter scraped track lists on audio_url before presenting choices to users
- Treat 'Unknown' titles and null durations as scraper-breakage signals and re-search
When it happens
Trigger: Calling the pixabay_music tool with a track index/selection whose scraped entry lacked a parseable audio URL; Pixabay serving a different HTML layout (A/B test, redesign, bot detection page) so the extraction in _search returns {'title': 'Unknown', 'audio_url': None} entries.
Common situations: Pixabay site redesign or CDN/anti-bot interstitial breaking the scraper; selecting a track from a stale cached result list; running the tool in a region where Pixabay serves different markup.
Related errors
- Invalid stage: {stage!r} for pipeline {pipeline_type!r}. Val
- Invalid status: {status!r}
- Checkpoint artifacts must be a dictionary
- Checkpoint failed schema validation: {exc.message}
- DashScope ASR task failed: {msg}
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/5a71caacc13c3b40.
Report an issue: GitHub.