Closed albertvillanova closed 4 weeks ago
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Do you think this is worth making a patch release for? CC: @huggingface/datasets
maybe not super important since it was not reported by users, this can be included in the next release
I observed the same AttributeError with Pillow == 10.3.0, while 9.4.0 works for me.
What's the error you're getting @Eric2i ?
On my side on 10.3.0 I could run this without errors:
import PIL.Image
PIL.Image.ExifTags.Base.Orientation is not None # True
Sorry, false alarm. I double-checked that 10.3.0 is also good on my side. Thanks for your sample codes.
I just faced the same bug after installing recent versions of Huggingface and datasets in a new environment. I solved it by uninstalling the recent version of Pillow and sticking to 9.4.0.
pip uninstall Pillow
pip install Pillow==9.4.0
Require Pillow >= 9.4.0 to avoid AttributeError when loading image dataset.
The
PIL.Image.ExifTags
that we use in our code was implemented in Pillow-9.4.0: https://github.com/python-pillow/Pillow/commit/24a5405a9f7ea22f28f9c98b3e407292ea5ee1d3The bug #6881 was introduced in datasets-2.19.0 by this PR:
6739
Fix #6881.