ahupp / python-magic

A python wrapper for libmagic
Other
2.6k stars 280 forks source link

mime_tyValueError: not enough values to unpack (expected 2, got 1) #254

Closed ElissonRodrigues closed 2 years ago

ElissonRodrigues commented 2 years ago

from magic import detect_from_filename

name = "vídeo.mp4"

detect_fromfilename(name) Traceback (most recent call last): File "", line 1, in File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/magic/init.py", line 425, in return fn(*args, **kwargs) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/magic/compat.py", line 260, in detect_from_filename return _create_filemagic(mime_magic.file(filename), File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/magic/compat.py", line 248, in _create_filemagic mime_type, mime_encoding = mime_detected.split('; ') ValueError: not enough values to unpack (expected 2, got 1)