ytdl-org/youtube-dl · error · ExtractorError
%s. Use --username and --password or --netrc to provide acco
Error message
%s. Use --username and --password or --netrc to provide account credentials.
What it means
Error "%s. Use --username and --password or --netrc to provide account credentials." thrown in ytdl-org/youtube-dl.
Source
Thrown at youtube_dl/extractor/common.py:1012
def report_extraction(self, id_or_name):
"""Report information extraction."""
self.to_screen('%s: Extracting information' % id_or_name)
def report_download_webpage(self, video_id):
"""Report webpage download."""
self.to_screen('%s: Downloading webpage' % video_id)
def report_age_confirmation(self):
"""Report attempt to confirm age."""
self.to_screen('Confirming age')
def report_login(self):
"""Report attempt to log in."""
self.to_screen('Logging in')
@staticmethod
def raise_login_required(msg='This video is only available for registered users'):
raise ExtractorError(
'%s. Use --username and --password or --netrc to provide account credentials.' % msg,
expected=True)
@staticmethod
def raise_geo_restricted(msg='This video is not available from your location due to geo restriction', countries=None):
raise GeoRestrictedError(msg, countries=countries)
def raise_no_formats(self, msg, expected=False, video_id=None):
if expected and (
self.get_param('ignore_no_formats_error') or self.get_param('wait_for_video')):
self.report_warning(msg, video_id)
elif isinstance(msg, ExtractorError):
raise msg
else:
raise ExtractorError(msg, expected=expected, video_id=video_id)
# Methods for following #608
@staticmethodView on GitHub (pinned to 956b8c5855)
Solutions
- Provide account credentials with --username and --password, or use a --netrc file.
When it happens
Trigger: Thrown at youtube_dl/extractor/common.py:1012 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/eff33431882fd5ea.
Report an issue: GitHub.