Package: python3-magic
Version: 2:0.4.27-3
Severity: normal
X-Debbugs-Cc: [email protected]
Dear Maintainer,
* What led up to the situation?
zip -r archive.zip randomdir
file archive.zip --mime # output: application/zip
python3
import magic
f = open('/tmp/archive.zip', 'rb').read()
magic.from_buffer(f, mime=True) # output: application/octet-stream
* What was the outcome of this action?
obviously the detected file type is not correct. the file command
detects the correct mime type, but python3-magic fails. this is
reproducible for any zip file independent of file extension with
suspicion on happening with some other file types as well.
some other files, e.g. .jpg are recognized correctly, even when renamed
to false file extension name.
* What outcome did you expect instead?
correct output of mime type as in file command.
-- System Information:
Debian Release: 13.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-37-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_USER, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
Versions of packages python3-magic depends on:
ii libmagic1t64 1:5.46-5
ii python3 3.13.5-1
python3-magic recommends no packages.
python3-magic suggests no packages.
-- no debconf information