Skip to content

ImportError: failed to find libmagic. Check your installation #20

@double77

Description

@double77

This is my code:

from postpy2.core import PostPython
runner = PostPython('idelium-cl.postman_collection.json')

And this is the error:

python test.py          
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from postpy2.core import PostPython
  File "/Users/idelfuschini/opt/anaconda3/lib/python3.8/site-packages/postpy2/core.py", line 9, in <module>
    from postpy2.extractors import extract_dict_from_raw_headers, extract_dict_from_headers, extract_dict_from_raw_mode_data, format_object, extract_dict_from_formdata_mode_data, exctact_dict_from_files
  File "/Users/idelfuschini/opt/anaconda3/lib/python3.8/site-packages/postpy2/extractors.py", line 3, in <module>
    import magic
  File "/Users/idelfuschini/opt/anaconda3/lib/python3.8/site-packages/magic/__init__.py", line 209, in <module>
    libmagic = loader.load_lib()
  File "/Users/idelfuschini/opt/anaconda3/lib/python3.8/site-packages/magic/loader.py", line 49, in load_lib
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

we have installed libmagic, pyhton-magic and on my mac I have install libmagic via brew

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions