ytdl-org/youtube-dl · error · ExtractorError
item['msg'] (dynamic server message, e.g. 'Sorry, this conte
Error message
item['msg'] (dynamic server message, e.g. 'Sorry, this content is not available in your country.')
What it means
Raised by the ZingMp3 extractor when the API 'item' contained no playable formats and fatal is true. The message is taken verbatim from item['msg']; the known value 'Sorry, this content is not available in your country.' is converted into a geo-restriction error (raise_geo_restricted) before this generic raise, so this path carries any other server reason.
Source
Thrown at youtube_dl/extractor/zingmp3.py:52
'url': video_url,
'height': int_or_none(self._search_regex(
r'^(\d+)p', res, 'resolution', default=None)),
})
else:
formats.append({
'ext': 'mp3',
'format_id': k,
'tbr': int_or_none(k),
'url': self._proto_relative_url(v),
'vcodec': 'none',
})
if not formats:
if not fatal:
return
msg = item['msg']
if msg == 'Sorry, this content is not available in your country.':
self.raise_geo_restricted(countries=self._GEO_COUNTRIES)
raise ExtractorError(msg, expected=True)
self._sort_formats(formats)
subtitles = None
lyric = item.get('lyric')
if lyric:
subtitles = {
'origin': [{
'url': lyric,
}],
}
album = item.get('album') or {}
return {
'id': item_id,
'title': title,
'formats': formats,
'thumbnail': item.get('thumbnail'),View on GitHub (pinned to 956b8c5855)
Solutions
- Open the track page in a browser to see the site's own notice (removed / VIP / region locked)
- If region-related, retry without VPN or with a VPN into Vietnam, depending on where the block applies
- Log in with --username/--password if the track requires a VIP account
- Update youtube-dl so newer API responses and message handling are supported
Defensive patterns
Strategy: try-catch
Try / catch
try:
ydl.download([url])
except ExtractorError as e:
msg = str(e)
if 'not available in your country' in msg or e.exc_info and 'geo' in type(e).__name__.lower():
route_through_allowed_region(url)
else:
log.warning('ZingMp3 server message: %s', msg) Prevention
- Handle the geo-restriction variant separately from other server messages
- Confirm tracks are playable in a browser with the same network/account before batch jobs
- Pass account credentials when downloading VIP-gated content
When it happens
Trigger: Requesting a ZingMp3 track whose API item has no 'sources'/'formats' entries and a non-empty 'msg' — typically content removed for licensing, region locks other than the recognized geo message, or account/age restrictions.
Common situations: Songs delisted from ZingMp3 after licensing expiry; VPN/proxy making the service return a restriction message; VIP-only tracks on a free session.
Related errors
- %s returned error: %s
- %s said: %s
- %s said: %s
- The video is not available from your location
- Unable to load data. Error code: %s
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/9822b9b104b61bbd.
Report an issue: GitHub.