ahupp / python-magic

A python wrapper for libmagic
Other
2.64k stars 283 forks source link

AttributeError: Symbol not found: magic_open in Release 0.4.20 #232

Closed anushbmx closed 3 years ago

anushbmx commented 3 years ago

There is an error in new release 0.4.20 'AttributeError: Symbol not found: magic_open'

File "/usr/local/lib/python3.7/site-packages/magic/compat.py", line 64, in <module>
    _open = _libraries['magic'].magic_open

Quick fix is to use version 0.4.18

ynerant commented 3 years ago

Same issue, tested on Alpine Linux with Python 3.7-3.8-3.9 with only libmagic installed (and Python)

amir5121 commented 3 years ago

I have the same issue.. probably related to this commit

ahupp commented 3 years ago

Ah I see. The compat layer doesn't have all the same logic for finding the DLL that the top-level library has. Will fix.

artemistomaras commented 3 years ago

Same issue here. Reverting to 0.4.18

ahupp commented 3 years ago

Fixed in b520bf0bf6f815afad33878ecdbe4b1d907dcc94 / 0.4.21. Thanks for the report!

ahupp commented 3 years ago

@anushbmx @ynerant, I should mention that I wasn't able to reproduce this issue in a docker image w/ alpine:latest. Could you verify 0.4.21 fixes it for you?

anushbmx commented 3 years ago

@ahupp Will update you once I retry with new version.