Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cortex4py libmagic error on Windows systems #29

Open
cyberenergy opened this issue Nov 14, 2024 · 0 comments
Open

cortex4py libmagic error on Windows systems #29

cyberenergy opened this issue Nov 14, 2024 · 0 comments

Comments

@cyberenergy
Copy link

Dear devs, cortex4py 2.1.0 fails on Windows clients with this error when installed out of the box

tests\conftest.py:9:` in <module>
[REDACTED].tox\testing\Lib\site-packages\cortex4py\api.py:9: in <module>
    from .controllers.organizations import OrganizationsController
.tox\testing\Lib\site-packages\cortex4py\controllers\__init__.py:6: in <module>
    from .analyzers import AnalyzersController
.tox\testing\Lib\site-packages\cortex4py\controllers\analyzers.py:3: in <module>
    import magic
.tox\testing\Lib\site-packages\magic\__init__.py:209: in <module>
    libmagic = loader.load_lib()
.tox\testing\Lib\site-packages\magic\loader.py:49: in load_lib
    raise ImportError('failed to find libmagic.  Check your installation')
E   ImportError: failed to find libmagic.  Check your installation

Windows requires another package to run and it can be solved by un- then installing a different package:

pip uninstall python-magic
pip install python-magic-bin

Nevertheless, this leads to cortex4py not running out of the box on Windows systems and making it not OS-independent. While there is a solution, it adds additional complexity when using tools such as tox across different OS.

I found the solution here, it has been fixed long ago in thehive4py as it seems: ImportError: failed to find libmagic. Check your installation

Thank you for taking note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant