ytdl-org/youtube-dl · error · ExtractorError

Executing JS failed\n:

Error message

Executing JS failed\n:

What it means

Error "Executing JS failed\n:" thrown in ytdl-org/youtube-dl.

Source

Thrown at youtube_dl/extractor/openload.py:233

        for x in self._TMP_FILE_NAMES:
            replaces[x] = self._TMP_FILES[x].name.replace('\\', '\\\\').replace('"', '\\"')

        with open(self._TMP_FILES['script'].name, 'wb') as f:
            f.write(self._TEMPLATE.format(**replaces).encode('utf-8'))

        if video_id is None:
            self.extractor.to_screen('%s' % (note2,))
        else:
            self.extractor.to_screen('%s: %s' % (video_id, note2))

        p = subprocess.Popen([
            self.exe, '--ssl-protocol=any',
            self._TMP_FILES['script'].name
        ], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out, err = process_communicate_or_kill(p)
        if p.returncode != 0:
            raise ExtractorError(
                'Executing JS failed\n:' + encodeArgument(err))
        with open(self._TMP_FILES['html'].name, 'rb') as f:
            html = f.read().decode('utf-8')

        self._load_cookies()

        return (html, encodeArgument(out))

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Check the PhantomJS execution error; update PhantomJS and youtube-dl.

When it happens

Trigger: Thrown at youtube_dl/extractor/openload.py:233 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/a10a42218be3397d. Report an issue: GitHub.