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: imageIO incompatibility #179

Closed
bsipocz opened this issue Apr 25, 2023 · 0 comments · Fixed by #180
Closed

BUG: imageIO incompatibility #179

bsipocz opened this issue Apr 25, 2023 · 0 comments · Fixed by #180
Labels
bug Something isn't working

Comments

@bsipocz
Copy link
Member

bsipocz commented Apr 25, 2023

Issue with the new release. Getting issue #154 addressed would likely safeguard us against surprises like by making the CI choke on deprecation warnings before they turn to regressions.

=================================== FAILURES ===================================
____________ content/tutorial-x-ray-image-processing.ipynb::Cell 6 _____________
Notebook cell execution failed
Cell 6: Cell execution caused an exception

Input:
GIF_PATH = os.path.join(DIR, "xray_image.gif")
imageio.mimwrite(GIF_PATH, combined_xray_images_1, format= ".gif", fps=1)

Traceback:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 2
      1 GIF_PATH = os.path.join(DIR, "xray_image.gif")
----> 2 imageio.mimwrite(GIF_PATH, combined_xray_images_1, format= ".gif", fps=1)

File ~/work/numpy-tutorials/numpy-tutorials/.tox/py310-test/lib/python3.10/site-packages/imageio/v2.py:480, in mimwrite(uri, ims, format, **kwargs)
    478 imopen_args["legacy_mode"] = True
    479 with imopen(uri, "wI", **imopen_args) as file:
--> 480     return file.write(ims, is_batch=True, **kwargs)

File ~/work/numpy-tutorials/numpy-tutorials/.tox/py310-test/lib/python3.10/site-packages/imageio/plugins/pillow.py:319, in PillowPlugin.write(self, ndimage, mode, format, is_batch, **kwargs)
    273 """
    274 Write an ndimage to the URI specified in path.
    275 
   (...)
    316 
    317 """
    318 if "fps" in kwargs:
--> 319     raise TypeError(
    320         "The keyword `fps` is no longer supported. Use `duration`"
    321         "(in ms) instead, e.g. `fps=50` == `duration=20` (1000 * 1/50)."
    322     )
    324 extension = self.request.extension or self.request.format_hint
    326 save_args = {
    327     "format": format or Image.registered_extensions()[extension],
    328 }

TypeError: The keyword `fps` is no longer supported. Use `duration`(in ms) instead, e.g. `fps=50` == `duration=20` (1000 * 1/50).
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

Successfully merging a pull request may close this issue.

1 participant