Skip to content
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

AttributeError: module 'imagehash' has no attribute 'average_hash' #192

Closed
prescriptionlifeline opened this issue Aug 24, 2023 · 1 comment

Comments

@prescriptionlifeline
Copy link

Here's my code:

from PIL import Image
import imagehash
import sys

hash = imagehash.average_hash(Image.open(sys.argv[1]), 16)
print(hash)

AttributeError: module 'imagehash' has no attribute 'average_hash' is the error I'm getting.

I'm running Python 3.5.3 and ImageHash 4.3.1.

I had it working before but now it's not and I have no idea as to why.

@JohannesBuchner
Copy link
Owner

try uninstalling and reinstalling imagehash?

imagehash.__file__ can tell you which python file it picks up. Also don't make a file called imagehash.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants