{"record":{"id":"7b9e828add3e188e","repo":"yt-dlp/yt-dlp","slug":"opening-the-video-failed-ie-name-said-warning","errorCode":null,"errorMessage":"Opening the video failed, {IE_NAME} said: {warning!r}","messagePattern":"Opening the video failed, (.+?) said: (.+?)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"yt_dlp/extractor/owncloud.py","lineNumber":79,"sourceCode":"    def _verify_video_password(self, webpage, url, video_id):\n        password = self.get_param('videopassword')\n        if password is None:\n            raise ExtractorError(\n                'This video is protected by a password, use the --video-password option',\n                expected=True)\n\n        validation_response = self._download_webpage(\n            url, video_id, 'Validating Password', 'Wrong password?',\n            data=urlencode_postdata({\n                'requesttoken': self._hidden_inputs(webpage)['requesttoken'],\n                'password': password,\n            }))\n\n        if re.search(r'<label[^>]+for=\"password\"', validation_response):\n            warning = self._search_regex(\n                r'<div[^>]+class=\"warning\">([^<]*)</div>', validation_response,\n                'warning', default='The password is wrong')\n            raise ExtractorError(f'Opening the video failed, {self.IE_NAME} said: {warning!r}', expected=True)\n        return validation_response\n","sourceCodeStart":61,"sourceCodeEnd":81,"githubUrl":"https://github.com/yt-dlp/yt-dlp/blob/81ecd58b1394793e6da9998cc19fdb45657f1685/yt_dlp/extractor/owncloud.py#L61-L81","documentation":"The ownCloud share password was sent for validation (posted together with the page's requesttoken), but the response still contains the password input label, so the server rejected it. The extractor surfaces the site's own warning text from the <div class=\"warning\"> element, defaulting to 'The password is wrong'. This is the expected failure for an incorrect share password.","triggerScenarios":"Posting a wrong, typo'd, or stale 'videopassword' to a protected ownCloud/Nextcloud share; the share password was changed by the owner after the link was shared.","commonSituations":"Copy-paste with trailing whitespace or invisible characters; password rotated since the link was sent; different password than the one configured on that specific share.","solutions":["Re-enter the exact share password with --video-password; check for stray spaces or unicode look-alikes.","Verify in a browser: open the share URL and type the password. The same 'The password is wrong' warning appears if it is wrong there too.","If the browser accepts it but yt-dlp fails, update yt-dlp; ownCloud themes occasionally change the warning markup and break detection.","In interactive callers, catch this error and re-prompt instead of aborting the whole batch."],"exampleFix":"# before (single attempt, dies on wrong password)\nwith yt_dlp.YoutubeDL({'videopassword': pw}) as ydl:\n    info = ydl.extract_info(url, download=True)\n# after (catch and re-prompt)\nfrom yt_dlp.utils import ExtractorError\nwhile True:\n    try:\n        with yt_dlp.YoutubeDL({'videopassword': pw}) as ydl:\n            info = ydl.extract_info(url, download=True)\n        break\n    except ExtractorError as e:\n        if 'Opening the video failed' not in str(e) or not e.expected:\n            raise\n        pw = ask_user_password(url)","handlingStrategy":"retry","validationCode":null,"typeGuard":"def is_owncloud_wrong_password(exc: Exception) -> bool:\n    return (\n        isinstance(exc, ExtractorError)\n        and exc.expected\n        and str(exc).startswith('Opening the video failed')\n    )","tryCatchPattern":"from yt_dlp.utils import ExtractorError\n\nfor attempt, pw in enumerate(password_candidates, 1):\n    try:\n        with yt_dlp.YoutubeDL({'videopassword': pw}) as ydl:\n            info = ydl.extract_info(url, download=True)\n        break\n    except ExtractorError as e:\n        if not (e.expected and 'Opening the video failed' in str(e)):\n            raise\n        if attempt == len(password_candidates):\n            raise  # all candidates rejected","preventionTips":["Trim whitespace from passwords before passing them.","Confirm the password in a browser first; the site shows the same warning.","In interactive tools, re-prompt on this specific message rather than failing the batch."],"tags":["yt-dlp","owncloud","nextcloud","wrong-password","share-protection","extractor-error"],"backgroundTag":"wrong-password","analyzedSha":"81ecd58b1394793e6da9998cc19fdb45657f1685","analyzedAt":"2026-08-22T12:21:25.439Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}