Skip to content

BUG: imageIO incompatibility #179

Closed
@bsipocz

Description

@bsipocz

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions