ahupp / python-magic

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

Error on setparam in 0.4.1[78] #213

Open ahupp opened 4 years ago

ahupp commented 4 years ago

@mbarakaja reports:

I am not sure if this is related but my build started failing with this new version

h_inventory/fetch.py:131: in _validate mimetype = magic.from_buffer(response.content, mime=True) ../../../virtualenv/python2.7.14/lib/python2.7/site-packages/magic.py:165: in from_buffer m = _get_magic_type(mime) ../../../virtualenv/python2.7.14/lib/python2.7/site-packages/magic.py:139: in _get_magic_type i = _instances[mime] = Magic(mime=mime) ../../../virtualenv/python2.7.14/lib/python2.7/site-packages/magic.py:76: in init self.setparam(MAGIC_PARAM_NAME_MAX, 64) ../../../virtualenv/python2.7.14/lib/python2.7/site-packages/magic.py:113: in setparam return magic_setparam(self.cookie, param, val) ../../../virtualenv/python2.7.14/lib/python2.7/site-packages/magic.py:322: in magic_setparam return _magic_setparam(cookie, param, byref(v)) ../../../virtualenv/python2.7.14/lib/python2.7/site-packages/magic.py:217: in errorcheck_negative_one raise MagicException(err) E MagicException: None