yt-dlp/yt-dlp · error · ExtractorError

Could not find playlist data. Error code: "{error_code}"

Error message

Could not find playlist data. Error code: "{error_code}"

What it means

Raised by BandlabPlaylistIE._real_extract (yt_dlp/extractor/bandlab.py:418) when both candidate endpoints ('albums', 'collections', tried with expected_status=404 and fatal=False) returned a payload containing an errorCode. The last errorCode is echoed in the message; it means Bandlab's API refused the id for the requested playlist kind.

Source

Thrown at yt_dlp/extractor/bandlab.py:418

                self.report_warning(f'Skipping unknown post type: "{post_type}"')

    def _real_extract(self, url):
        playlist_id, playlist_type = self._match_valid_url(url).group('id', 'type')

        endpoints = {
            'albums': ['albums'],
            'collections': ['collections'],
            'embed': ['collections', 'albums'],
        }.get(playlist_type)
        for endpoint in endpoints:
            playlist_data = self._call_api(
                endpoint, playlist_id, note=f'Downloading {endpoint[:-1]} data',
                fatal=False, expected_status=404)
            if not playlist_data.get('errorCode'):
                playlist_type = endpoint
                break
        if error_code := playlist_data.get('errorCode'):
            raise ExtractorError(f'Could not find playlist data. Error code: "{error_code}"')

        return self.playlist_result(
            self._entries(playlist_data), playlist_id,
            **traverse_obj(playlist_data, {
                'title': ('name', {str}),
                'description': ('description', {str}),
                'uploader': ('creator', 'name', {str}),
                'uploader_id': ('creator', 'username', {str}),
                'timestamp': ('createdOn', {parse_iso8601}),
                'release_date': ('releaseDate', {lambda x: x.replace('-', '')}, filter),
                'thumbnail': ('picture', ('original', 'url'), {url_or_none}, any),
                'like_count': ('counters', 'likes', {int_or_none}),
                'comment_count': ('counters', 'comments', {int_or_none}),
                'view_count': ('counters', 'plays', {int_or_none}),
            }),
            **(traverse_obj(playlist_data, {
                'album': ('name', {str}),
                'album_type': ('type', {str}),

View on GitHub (pinned to 81ecd58b13)

Solutions

  1. Open the playlist URL in a browser while logged out and confirm it is publicly accessible
  2. Copy the URL again from the address bar - the id must be the full hex/uuid string
  3. Update yt-dlp (yt-dlp -U)
  4. Report the URL and the errorCode value at https://github.com/yt-dlp/yt-dlp/issues with -v output
Defensive patterns

Strategy: validation

Validate before calling

import urllib.request

def playlist_is_public(url):
    req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
    try:
        urllib.request.urlopen(req)
        return True
    except urllib.error.HTTPError:
        return False  # 404/private -> expect 'Could not find playlist data'

Try / catch

from yt_dlp.utils import ExtractorError

try:
    info = ydl.extract_info(url, download=False)
except ExtractorError as e:
    if 'Could not find playlist data' in str(e):
        mark_not_found(url)  # deleted/private/wrong id; retrying will not help
    else:
        raise

Prevention

When it happens

Trigger: The id from the URL is not a public album or collection on Bandlab - deleted, private/unlisted, region-locked, or simply wrong (the regex expects a hex/uuid id); both endpoint probes 404 with an errorCode body.

Common situations: Deleted or private albums/collections; embed URLs whose query id was truncated; sharing links to drafts; API changes renaming endpoints or error envelopes.

Related errors


AI-assisted analysis of yt-dlp/yt-dlp@81ecd58b13 (2026-08-22). Data as JSON: /api/errors/a833e1a3e337212b. Report an issue: GitHub.