python-magic icon indicating copy to clipboard operation
python-magic copied to clipboard

A python wrapper for libmagic

Results 62 python-magic issues
Sort by recently updated
recently updated
newest added

boto3 library has s3 get_object that accepts a byte range (to avoid downloading a whole file but just download selected byte range). if my file is 100mb, can this library...

Add workaround for find libmagic libraries in Windows with installed `python-magic-bin`. [source issue with my comment](https://github.com/ahupp/python-magic/issues/248#issuecomment-901053276)

When I `import magic` the Python process immediately exits with status 9 without printing any error message. This is due to problems in my environment and I don't mind that...

For windows it would be quite good, because then if the cwd contains the dll and the mgc file everything works out of the box :)

i test zip,rar file got these result --------------------------------------------- magic.from_file('test.zip', mime=True) application/octet-stream magic.from_file('test.rar', mime=True) application/octet-stream --------------------------------------------- but z01 is ok magic.from_file('test.z01', mime=True) application/zip

waiting-response

File "/Users/tzeppy/repo/breadsticks/env/lib/python3.7/site-packages/magic.py", line 148, in from_buffer return m.from_buffer(buffer) File "/Users/tzeppy/repo/breadsticks/env/lib/python3.7/site-packages/magic.py", line 80, in from_buffer return maybe_decode(magic_buffer(self.cookie, buf)) File "/Users/tzeppy/repo/breadsticks/env/lib/python3.7/site-packages/magic.py", line 206, in maybe_decode return s.decode('utf-8') UnicodeDecodeError: 'utf-8' codec can't decode...

Hi yesterday my travis build failed on s3cmd after investigating it was the new version of your library this is the error i got: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! An unexpected error has occurred....

I found it does work in python3, win10 with eyed3 0.8.5. it can not open a offending filename like '1호선 뮤직 - 열대야.mp3'. all that is because the code for...

This may be an issue with the underlying libmagic, but I'd like to retrieve both the MIME and regular magic string, e.g. 'ASCII text, with no line terminators' and 'text/plain',...

feature

@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...