aliles / filemagic

File type identification using libmagic
http://pypi.python.org/pypi/filemagic
Other
47 stars 10 forks source link

Error after import Magic #23

Open MaxPlayBR opened 4 years ago

MaxPlayBR commented 4 years ago
Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
    start(fakepyfile,mainpyfile)
  File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
    exec(open(mainpyfile).read(),  __main__.__dict__)
  File "<string>", line 1, in <module>
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.7/site-packages/magic/__init__.py", line 18, in <module>
    from magic.identify import Magic, MagicError
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.7/site-packages/magic/identify.py", line 16, in <module>
    from magic import api
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.7/site-packages/magic/api.py", line 22, in <module>
    raise ImportError('Unable to find magic library')
ImportError: Unable to find magic library

[Program finished]

My code:

import Magic
bbarker commented 4 years ago

I'm having a similar issue:

$ python
Python 3.7.6 (default, Dec 18 2019, 19:23:55)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import magic
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/brandon/workspace/arxiv-overlap-tests/venv/lib/python3.7/site-packages/magic/__init__.py", line 18, in <module>
    from magic.identify import Magic, MagicError
  File "/home/brandon/workspace/arxiv-overlap-tests/venv/lib/python3.7/site-packages/magic/identify.py", line 16, in <module>
    from magic import api
  File "/home/brandon/workspace/arxiv-overlap-tests/venv/lib/python3.7/site-packages/magic/api.py", line 22, in <module>
    raise ImportError('Unable to find magic library')
ImportError: Unable to find magic library