ytdl-org/youtube-dl · error · ExtractorError
pycryptodomex not found. Please install it.
Error message
pycryptodomex not found. Please install it.
What it means
Raised by the ivi.ru extractor when the Cryptodome library (pycryptodomex) is not importable. The signed-request variant of ivi's light API requires Cryptodome.Cipher.Blowfish and Cryptodome.Hash.CMAC to compute the request signature; without it the extractor cannot authenticate the request.
Source
Thrown at youtube_dl/extractor/ivi.py:148
'Downloading video JSON', data=content_data, query=query)
error = video_json.get('error')
if error:
origin = error.get('origin')
message = error.get('message') or error.get('user_message')
extractor_msg = 'Unable to download video %s'
if origin == 'NotAllowedForLocation':
self.raise_geo_restricted(message, self._GEO_COUNTRIES)
elif origin == 'NoRedisValidData':
extractor_msg = 'Video %s does not exist'
elif site == 353:
continue
elif bundled:
raise ExtractorError(
'This feature does not work from bundled exe. Run youtube-dl from sources.',
expected=True)
elif not pycryptodomex_found:
raise ExtractorError(
'pycryptodomex not found. Please install it.',
expected=True)
elif message:
extractor_msg += ': ' + message
raise ExtractorError(extractor_msg % video_id, expected=True)
else:
break
result = video_json['result']
title = result['title']
quality = qualities(self._KNOWN_FORMATS)
formats = []
for f in result.get('files', []):
f_url = f.get('url')
content_format = f.get('content_format')
if not f_url or '-MDRM-' in content_format or '-FPS-' in content_format:View on GitHub (pinned to 956b8c5855)
Solutions
- pip install pycryptodomex
- Verify the import works: python -c "from Cryptodome.Hash import CMAC"
- Do not substitute the old 'pycrypto' package - the code imports the Cryptodome namespace.
Example fix
// before pip install youtube-dl youtube-dl 'http://www.ivi.ru/watch/12345' # => pycryptodomex not found. Please install it. // after pip install pycryptodomex youtube-dl 'http://www.ivi.ru/watch/12345'
Defensive patterns
Strategy: validation
Validate before calling
try:
from Cryptodome.Hash import CMAC # noqa
from Cryptodome.Cipher import Blowfish # noqa
pycryptodomex_ok = True
except ImportError:
pycryptodomex_ok = False
if not pycryptodomex_ok and url_host_is('ivi.ru'):
raise EnvironmentError('pip install pycryptodomex before extracting ivi') Try / catch
try:
ydl.extract_info(ivi_url)
except ExtractorError as e:
if 'pycryptodomex not found' in str(e):
abort_with_hint('pip install pycryptodomex') # environment fix, then re-run Prevention
- Add pycryptodomex to requirements alongside youtube-dl.
- Check the Cryptodome import in CI for environments that will touch ivi URLs.
- Remember the namespace is Cryptodome, not Crypto - installing old pycrypto does not help.
When it happens
Trigger: from Cryptodome.Cipher import Blowfish / from Cryptodome.Hash import CMAC raise ImportError (pycryptodomex_found = False), the unsigned site-183 request then returns an API error, and the handler reports the missing dependency.
Common situations: Minimal Python environments, source installs where only pycrypto (not pycryptodomex) is present, or virtualenvs created without the extras.
Related errors
- This feature does not work from bundled exe. Run youtube-dl
- Unable to download video %s
- Invalid path
- Unauthorized user "%s"
- Missing "id" field in extractor result
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/d21d79b7a65130f4.
Report an issue: GitHub.