ytdl-org/youtube-dl · error · ExtractorError
Unable to resolve clip
Error message
Unable to resolve clip
What it means
PluralsightIE raises ExtractorError('Unable to resolve clip') after downloading the full course JSON and failing to find a clip whose clipIndex (or index) matches the clip query parameter within any module whose moduleName or name matches the name parameter. Unlike 'Invalid URL', this error is NOT marked expected=True, so it surfaces as an unexpected extraction failure. It means the course metadata was fetched successfully but the requested clip does not exist in it.
Source
Thrown at youtube_dl/extractor/pluralsight.py:307
collection = course['modules']
clip = None
for module_ in collection:
if name in (module_.get('moduleName'), module_.get('name')):
for clip_ in module_.get('clips', []):
clip_index = clip_.get('clipIndex')
if clip_index is None:
clip_index = clip_.get('index')
if clip_index is None:
continue
if compat_str(clip_index) == clip_idx:
clip = clip_
break
if not clip:
raise ExtractorError('Unable to resolve clip')
title = clip['title']
clip_id = clip.get('clipName') or clip.get('name') or clip['clipId']
QUALITIES = {
'low': {'width': 640, 'height': 480},
'medium': {'width': 848, 'height': 640},
'high': {'width': 1024, 'height': 768},
'high-widescreen': {'width': 1280, 'height': 720},
}
QUALITIES_PREFERENCE = ('low', 'medium', 'high', 'high-widescreen',)
quality_key = qualities(QUALITIES_PREFERENCE)
AllowedQuality = collections.namedtuple('AllowedQuality', ['ext', 'qualities'])
ALLOWED_QUALITIES = (
AllowedQuality('webm', ['high', ]),View on GitHub (pinned to 956b8c5855)
Solutions
- Open the course page in a browser and re-copy the player URL so author/name/clip/course match the current course structure.
- Confirm the clip number: the extractor compares str(clipIndex) to the 'clip' param, so pass the exact index as a string (e.g. clip=3).
- Check that 'name' matches a module name exactly (it is compared with `in` against moduleName/name), not the clip title.
- If it persists, dump the course JSON via _download_course and inspect module/clip indices to see how they shifted.
Defensive patterns
Strategy: try-catch
Try / catch
try:
info = ydl.extract_info(url)
except ExtractorError as e:
if 'Unable to resolve clip' in str(e):
# course structure changed; re-fetch page and rebuild URL
... Prevention
- Prefer freshly copied player URLs over stored ones — Pluralsight re-indexes clips.
- Match the clip param to the exact clipIndex shown in the course outline.
- Cache course->clip mappings only short-term; revalidate before batch runs.
When it happens
Trigger: The 'clip' query value has no matching clipIndex/index in the course's modules JSON; the module 'name' does not equal the 'name' param so clips are never scanned; or clips lack both 'clipIndex' and 'index' keys (both None -> continue). Any mismatch between URL-encoded clip number and the actual course structure triggers it.
Common situations: Course content updated and the clip index shifted or the clip was removed; clip index is 0-based in the URL but the course data uses different indexing; name slug typo versus the module's moduleName; stale copied URLs from an old course revision.
Related errors
- Invalid URL
- Invalid path
- Unauthorized user "%s"
- Missing "id" field in extractor result
- Missing "title" field in extractor result
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/93efaa4d99fa01bf.
Report an issue: GitHub.