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 during ScreamDSprites initialization #34

Open
bonheml opened this issue Feb 23, 2021 · 0 comments
Open

Bug during ScreamDSprites initialization #34

bonheml opened this issue Feb 23, 2021 · 0 comments

Comments

@bonheml
Copy link

bonheml commented Feb 23, 2021

I have noticed a bug when trying to use ScreamDsprites:

from disentanglement_lib.data.ground_truth.dsprites import ScreamDSprites
ScreamDSprites([1,2,3,4,5])

Raises an error:
Traceback (most recent call last): File "<input>", line 1, in <module> File "disentanglement_lib/disentanglement_lib/data/ground_truth/dsprites.py", line 183, in __init__ scream.thumbnail((350, 274, 3)) File ".venv/disentanglement_lib/lib/python3.6/site-packages/PIL/Image.py", line 2299, in thumbnail x, y = map(math.floor, size) ValueError: too many values to unpack (expected 2)

The issue seems to be that thumbnail size is taking a tuple of 3 values instead of 2.
I have modified l.182 of dsprites.py from scream.thumbnail((350, 274, 3)) to scream.thumbnail((350, 274)) and this is working properly.

I am using Pillow 8.0.1, but the thumbnail size was already 2D in Pillow 5.0.0 so this is not a compatibility issue.

I should add that the bug is also present in cars3D

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

1 participant