-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with running first time index on macOS #122
Comments
I'm observing the same behavior:
$ pip3 show filemagic
Name: filemagic
Version: 1.6
Summary: A Python API for libmagic, the library behind the Unix file command
Home-page: http://filemagic.readthedocs.org
Author: Aaron Iles
Location: /Users/clint/Library/Python/3.7/lib/python/site-packages @karlicoss which version of |
Hi everyone! Sorry for a late reply, busy days... So, promnesia is actually using python-magic. Line 67 in 8fbaa66
I didn't know of filemagic, but python-magic seems to be more mature (and kept up to date)? Any reason you tried to use filemagic instead? Let me know if |
I am putting this hear because future users might stumble upon this thread due to filemagic libmagic and python-magic related keywords in this thread and also ran into below error when I executed ❮ promnesia index
[INFO 2020-07-05 22:37:23,902 promnesia common.py:417] extracting via promnesia.sources.auto:index ('/usr/share/doc/python3/html/faq',) {} ... ...
[ERROR 2020-07-05 22:37:23,909 promnesia common.py:433] indexer emitted exception
Traceback (most recent call last):
File "/Users/wadkar/.pyenv/versions/3.8.3/envs/promenesia/lib/python3.8/site-packages/promnesia/sources/auto.py", line 291, in _index
yield from _index_file(pp, opts=opts)
File "/Users/wadkar/.pyenv/versions/3.8.3/envs/promenesia/lib/python3.8/site-packages/promnesia/sources/auto.py", line 317, in _index_file
pm = mime(pp)
File "/Users/wadkar/.pyenv/versions/3.8.3/envs/promenesia/lib/python3.8/site-packages/promnesia/sources/auto.py", line 26, in mime
return _magic().from_file(str(path))
File "/Users/wadkar/.pyenv/versions/3.8.3/envs/promenesia/lib/python3.8/site-packages/promnesia/sources/auto.py", line 21, in _magic
import magic # type: ignore
File "/Users/wadkar/.pyenv/versions/3.8.3/envs/promenesia/lib/python3.8/site-packages/magic.py", line 201, in <module>
raise ImportError('failed to find libmagic. Check your installation')
ImportError: failed to find libmagic. Check your installation There's line in your
|
@karlicoss no problem at all, thanks for your response! Uninstalling To help future people coming across this issue, would it be useful to update the README to indicate that if you're on macOS and you're getting errors related to You could also add a |
@wadkar hm, so as far as I understand (don't have a mac, so was doing it semi-blind :) ), @clintgibler cool! So, |
@karlicoss Also, thanks for this - I need to do a proper (Edit: Just to add, it seems that the docs say that even Linux(Debian/Ubuntu) users need to do |
@wadkar ah, right! I guess |
Uninstalling and installing a specific version of python-magic worked for me. pip uninstall python-magic Source/Credits: Yelp/elastalert#1927 (comment) |
@santhosh82 hmm, unlikely it's about the version, it's just a different package. Seems that |
I think I didn't try installing libmagic using brew. |
Ok! Anyway, I added |
I've installed libmagic as per https://filemagic.readthedocs.io/en/latest/guide.html
The text was updated successfully, but these errors were encountered: