Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Twitch] ERROR: An extractor error has occurred. (caused by KeyError('data')); #33218

@pitsi

Description

@pitsi

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2025.10.19
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

$ youtube-dl -Fv https://m.twitch.tv/videos/2578729410
[debug] System config: []
[debug] User config: ['--no-cache-dir', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36']
[debug] Custom config: []
[debug] Command-line args: ['-Fv', 'https://m.twitch.tv/videos/2578729410']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2025.10.19 [1e109aaee] (single file build)
[debug] ** This version was built from the latest master code at https://github.com/ytdl-org/youtube-dl.
[debug] ** For support, visit the main site.
[debug] Python 3.13.9 (CPython x86_64 64bit) - Linux-6.16.12+deb14+1-amd64-x86_64-with-glibc2.41 - OpenSSL 3.5.4 30 Sep 2025 - glibc 2.41
[debug] exe versions: ffmpeg 8.0, ffprobe 8.0
[debug] Proxy map: {}
[twitch:vod] 2578729410: Downloading stream metadata GraphQL
ERROR: An extractor error has occurred. (caused by KeyError('data')); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
Traceback (most recent call last):
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/common.py", line 573, in extract
    ie_result = self._real_extract(url)
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/twitch.py", line 332, in _real_extract
    info = self._download_info(vod_id)
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/twitch.py", line 255, in _download_info
    data = self._download_gql(
           ~~~~~~~~~~~~~~~~~~~
    ...<6 lines>...
        }],
        ~~~
        'Downloading stream metadata GraphQL')[0]['data']
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'data'
Traceback (most recent call last):
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/common.py", line 573, in extract
    ie_result = self._real_extract(url)
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/twitch.py", line 332, in _real_extract
    info = self._download_info(vod_id)
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/twitch.py", line 255, in _download_info
    data = self._download_gql(
           ~~~~~~~~~~~~~~~~~~~
    ...<6 lines>...
        }],
        ~~~
        'Downloading stream metadata GraphQL')[0]['data']
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 886, in wrapper
    return func(self, *args, **kwargs)
  File "/home/user/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 982, in __extract_info
    ie_result = ie.extract(url)
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/common.py", line 586, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('data')); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose option and include the complete output.

Description

Youtube-dl no longer works with twitch due to the forementioned error. I noticed it a few days ago, because I use it in a bash script to get the playable urls of a few videos and it was returning a blank file.

Relevant commits from yt-dlp, which prove that extraction from twitch did change for everything it hosts.
yt-dlp/yt-dlp@7eff676
yt-dlp/yt-dlp@b46c572
yt-dlp/yt-dlp@cb78440

Metadata

Metadata

Assignees

No one assigned

    Labels

    broken-IEproblem with existing site extractionhelp-wantedMaintainer(s) need help to progress the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions