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

BUG REPORT: AttributeError due to PIL.Image v10+ dropping ANTIALIAS #108

Open
hagemt opened this issue Aug 6, 2023 · 4 comments
Open

BUG REPORT: AttributeError due to PIL.Image v10+ dropping ANTIALIAS #108

hagemt opened this issue Aug 6, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@hagemt
Copy link

hagemt commented Aug 6, 2023

Describe the bug

VideoHash results in:

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

Due to PIL.Image v10+ having deprecated ANTILIAS; fix appears to be LANCZOS or pinning PIL < 10:

https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#constants

To Reproduce

Install via pip with PIL and pillow from brew (currently 10.0.0)

VideoHash("path/to.mp4")

Expected behavior

Object with .hash and no AttributeError

Screenshots

N/A

Please complete the following information:

  • Operating system: macOS Ventura 13.5
  • Python Version: 3.11.4
  • VideoHash version: 3.0.1

Additional context

I think this would be a good first issue for another contributor. Should I attempt a PR?

@hagemt hagemt added the bug Something isn't working label Aug 6, 2023
@hagemt hagemt changed the title BUG REPORT BUG REPORT: AttributeError due to PIL.Image v10+ dropping ANTIALIAS Aug 6, 2023
@Demmenie
Copy link

Demmenie commented Sep 8, 2023

This is fixed in PR #109 but it still needs to be merged.

@rkgitvinay
Copy link

Worked for me
pip install Pillow==9.5.0

@Demmenie
Copy link

Worked for me pip install Pillow==9.5.0

This causes security issues. There are known DoS attacks that exploit versions of Pillow older than 10.0.1

@Demmenie
Copy link

Demmenie commented Jul 3, 2024

I've fixed the issue in my fork of this repository "videohash2":
https://github.com/Demmenie/videohash2
https://pypi.org/project/videohash2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants