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
New pillow release has broken array coercion #5455
Comments
______________ TestImageCollection.test_custom_load_func_w_kwarg ______________
self = <skimage.io.tests.test_collection.TestImageCollection testMethod=test_custom_load_func_w_kwarg>
def test_custom_load_func_w_kwarg(self):
load_pattern = os.path.join(data_dir, 'no_time_for_that_tiny.gif')
def load_fn(f, step):
vid = imageio.get_reader(f)
seq = [v for v in vid.iter_data()]
return seq[::step]
ic = ImageCollection(load_pattern, load_func=load_fn, step=3)
# Each file should map to one image (array).
assert len(ic) == 1
# GIF file has 24 frames, so 24 / 3 equals 8.
> assert len(ic[0]) == 8
C:\hostedtoolcache\windows\Python\3.9.5\x64\lib\site-packages\skimage\io\tests\test_collection.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.9.5\x64\lib\site-packages\skimage\io\collection.py:294: in __getitem__
> frame_paletted = np.array(im, np.uint8)
E TypeError: __array__() takes 1 positional argument but 2 were given
C:\hostedtoolcache\windows\Python\3.9.5\x64\lib\site-packages\imageio\plugins\pillow.py:745: TypeError |
Looks like there's a fix on the way: so let's just pin on |
Merged
jni
added a commit
to jni/scikit-image
that referenced
this issue
Jul 4, 2021
grlee77
pushed a commit
that referenced
this issue
Jul 5, 2021
* Pin pillow to !=8.3.0 Fixes #5455 * Explain why 8.3.0 was blocked from dependencies Co-authored-by: Mark Harfouche <mark.harfouche@gmail.com>
jni
added a commit
to regro-cf-autotick-bot/scikit-image-feedstock
that referenced
this issue
Jul 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Probably an issue for Pillow, but not sure yet so noting it down here. Example failure here:
I'm pretty sure that
__array__
methods should take indtype=
, but I don't know 100%.The text was updated successfully, but these errors were encountered: