yt-dlp/yt-dlp · error · ExtractorError
Opening the video failed, {IE_NAME} said: {warning!r}
Error message
Opening the video failed, {IE_NAME} said: {warning!r} What it means
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.
Source
Thrown at yt_dlp/extractor/owncloud.py:79
def _verify_video_password(self, webpage, url, video_id):
password = self.get_param('videopassword')
if password is None:
raise ExtractorError(
'This video is protected by a password, use the --video-password option',
expected=True)
validation_response = self._download_webpage(
url, video_id, 'Validating Password', 'Wrong password?',
data=urlencode_postdata({
'requesttoken': self._hidden_inputs(webpage)['requesttoken'],
'password': password,
}))
if re.search(r'<label[^>]+for="password"', validation_response):
warning = self._search_regex(
r'<div[^>]+class="warning">([^<]*)</div>', validation_response,
'warning', default='The password is wrong')
raise ExtractorError(f'Opening the video failed, {self.IE_NAME} said: {warning!r}', expected=True)
return validation_response
View on GitHub (pinned to 81ecd58b13)
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.
Example fix
# before (single attempt, dies on wrong password)
with yt_dlp.YoutubeDL({'videopassword': pw}) as ydl:
info = ydl.extract_info(url, download=True)
# after (catch and re-prompt)
from yt_dlp.utils import ExtractorError
while True:
try:
with yt_dlp.YoutubeDL({'videopassword': pw}) as ydl:
info = ydl.extract_info(url, download=True)
break
except ExtractorError as e:
if 'Opening the video failed' not in str(e) or not e.expected:
raise
pw = ask_user_password(url) Defensive patterns
Strategy: retry
Type guard
def is_owncloud_wrong_password(exc: Exception) -> bool:
return (
isinstance(exc, ExtractorError)
and exc.expected
and str(exc).startswith('Opening the video failed')
) Try / catch
from yt_dlp.utils import ExtractorError
for attempt, pw in enumerate(password_candidates, 1):
try:
with yt_dlp.YoutubeDL({'videopassword': pw}) as ydl:
info = ydl.extract_info(url, download=True)
break
except ExtractorError as e:
if not (e.expected and 'Opening the video failed' in str(e)):
raise
if attempt == len(password_candidates):
raise # all candidates rejected Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- This video is protected by a password, use the --video-passw
- This video in no longer available
- Coin purchase is required for this stream
- Ticket purchase is required for this stream
- Wrong password
AI-assisted analysis of yt-dlp/yt-dlp@81ecd58b13 (2026-08-22).
Data as JSON: /api/errors/7b9e828add3e188e.
Report an issue: GitHub.