ytdl-org/youtube-dl · error · ExtractorError

No login info available, needed for using %s.

Error message

No login info available, needed for using %s.

What it means

Raised by TennisTVIE._login when _get_login_info() returns no username or password (no --username/--password and no usable .netrc/_NETRC_MACHINE 'tennistv' entry). TennisTV requires a paid subscription login for every extraction, so missing credentials abort immediately with expected=True.

Source

Thrown at youtube_dl/extractor/tennistv.py:37

            'id': 'indian-wells-2018-verdasco-fritz',
            'ext': 'mp4',
            'title': 'Fernando Verdasco v Taylor Fritz',
            'description': 're:^After his stunning victory.{174}$',
            'thumbnail': 'https://atp-prod.akamaized.net/api/images/v1/images/112831/landscape/1242/0',
            'timestamp': 1521017381,
            'upload_date': '20180314',
        },
        'params': {
            'skip_download': True,
        },
        'skip': 'Requires email and password of a subscribed account',
    }
    _NETRC_MACHINE = 'tennistv'

    def _login(self):
        username, password = self._get_login_info()
        if not username or not password:
            raise ExtractorError('No login info available, needed for using %s.' % self.IE_NAME, expected=True)

        login_form = {
            'Email': username,
            'Password': password,
        }
        login_json = json.dumps(login_form).encode('utf-8')
        headers = {
            'content-type': 'application/json',
            'Referer': 'https://www.tennistv.com/login',
            'Origin': 'https://www.tennistv.com',
        }

        login_result = self._download_json(
            'https://www.tennistv.com/api/users/v1/login', None,
            note='Logging in',
            errnote='Login failed (wrong password?)',
            headers=headers,
            data=login_json)

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Pass --username <email> --password <pass>, or better: add 'machine tennistv login <email> password <pass>' to ~/.netrc and chmod 600 it, then run with --netrc.
  2. Confirm the account has an active TennisTV subscription — login alone does not grant video access (the extractor warns if entitlement != SUBSCRIBED).
  3. For automated jobs, ensure HOME points at the directory containing .netrc.

Example fix

# before
# youtube-dl https://www.tennistv.com/videos/123456
# after
printf 'machine tennistv login me@example.com password secret\n' >> ~/.netrc
chmod 600 ~/.netrc
youtube-dl --netrc https://www.tennistv.com/videos/123456
Defensive patterns

Strategy: validation

Validate before calling

# Ensure credentials are discoverable before running
import os, netrc
n = netrc.netrc() if os.path.exists(os.path.expanduser('~/.netrc')) else None
if not n or 'tennistv' not in [h for h, _ in n.hosts.items()]:
    fail('add: machine tennistv login EMAIL password PASS to ~/.netrc (chmod 600)')

Try / catch

try:
    ydl.extract_info(url)
except ExtractorError as e:
    if e.expected and 'No login info' in str(e):
        fail('tennistv requires --netrc credentials')
    raise

Prevention

When it happens

Trigger: Invoking the tennistv extractor without --username/--password, without --netrc, and without a .netrc file containing a 'machine tennistv' line.

Common situations: First-time users assuming highlights are free; CI jobs where $HOME/.netrc is absent; netrc file with wrong machine name or missing chmod 600 so it is ignored.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/1f0f4a997446255b. Report an issue: GitHub.