{"record":{"id":"93efaa4d99fa01bf","repo":"ytdl-org/youtube-dl","slug":"unable-to-resolve-clip","errorCode":null,"errorMessage":"Unable to resolve clip","messagePattern":"Unable to resolve clip","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/pluralsight.py","lineNumber":307,"sourceCode":"\n        collection = course['modules']\n\n        clip = None\n\n        for module_ in collection:\n            if name in (module_.get('moduleName'), module_.get('name')):\n                for clip_ in module_.get('clips', []):\n                    clip_index = clip_.get('clipIndex')\n                    if clip_index is None:\n                        clip_index = clip_.get('index')\n                    if clip_index is None:\n                        continue\n                    if compat_str(clip_index) == clip_idx:\n                        clip = clip_\n                        break\n\n        if not clip:\n            raise ExtractorError('Unable to resolve clip')\n\n        title = clip['title']\n        clip_id = clip.get('clipName') or clip.get('name') or clip['clipId']\n\n        QUALITIES = {\n            'low': {'width': 640, 'height': 480},\n            'medium': {'width': 848, 'height': 640},\n            'high': {'width': 1024, 'height': 768},\n            'high-widescreen': {'width': 1280, 'height': 720},\n        }\n\n        QUALITIES_PREFERENCE = ('low', 'medium', 'high', 'high-widescreen',)\n        quality_key = qualities(QUALITIES_PREFERENCE)\n\n        AllowedQuality = collections.namedtuple('AllowedQuality', ['ext', 'qualities'])\n\n        ALLOWED_QUALITIES = (\n            AllowedQuality('webm', ['high', ]),","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/pluralsight.py#L289-L325","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'Unable to resolve clip' in str(e):\n        # course structure changed; re-fetch page and rebuild URL\n        ...","preventionTips":["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."],"tags":["pluralsight","clip-resolution","extractor","content-drift"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}