Skip to content

bug/file type detection fallback strategy not working #3596

Closed
@WHALEEYE

Description

@WHALEEYE

Describe the bug
The following line tried to detect whether libmagic has been installed, but it actually only detects the installation of python-magic package instead of the true libmagic dependency.

LIBMAGIC_AVAILABLE = bool(importlib.util.find_spec("magic"))

Therefore, as long as python-magic is installed, LIBMAGIC_AVAILABLE will always be True, and if libmagic is not installed, import magic will cause an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions