Closed ChillarAnand closed 7 years ago
I thought this was fixed in this commit.
May be the above commit fixes the same problem but elsewhere. Also, Shouldn't the requirements file say >= in stead of == ?
It is better not to have >=
. If upstream packages introduces any changes, people using banti face problems and start complaining here.
Maintainers should first verify with new versions and have to update requirements file accordingly.
Makes sense. That is what is happening here. Upstream Pillow is not supporting zero as width and height.
>>> from PIL import Image as im
>>> import numpy as np
>>> im.fromarray(np.empty((0, 0), dtype=np.uint8))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 2187, in fromarray
return frombuffer(mode, size, obj, "raw", rawmode, 0, 1)
File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 2114, in frombuffer
_check_size(size)
File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 2001, in _check_size
raise ValueError("Width and Height must be > 0")
ValueError: Width and Height must be > 0
Do we file a bug there or update our code to not depend on 0x0 images?
It is better to fix it in upstream. Thanks.
banti was working well with
Pillow==3.1.1
. In another system, that pillow version is not getting installed. So I have installed latest versionPillow==3.4.2
. Now it throws this error with given sample file.