Bug#1010430: tifffile breaks skimage autopkgtest: asarray() got an unexpected keyword argument 'multifile'

Paul Gevers elbrus at debian.org
Sun May 1 13:45:32 BST 2022


Source: tifffile, skimage
Control: found -1 tifffile/20220426-1
Control: found -1 skimage/0.18.3-2
Severity: serious
Tags: sid bookworm
User: debian-ci at lists.debian.org
Usertags: breaks needs-update

Dear maintainer(s),

With a recent upload of tifffile the autopkgtest of skimage fails in 
testing when that autopkgtest is run with the binary packages of 
tifffile from unstable. It passes when run with only packages from 
testing. In tabular form:

                        pass            fail
tifffile               from testing    20220426-1
skimage                from testing    0.18.3-2
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of tifffile to 
testing [1]. Due to the nature of this issue, I filed this bug report 
against both packages. Can you please investigate the situation and 
reassign the bug to the right package?

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=tifffile

https://ci.debian.net/data/autopkgtest/testing/amd64/s/skimage/21268058/log.gz

_______________________ test_tifffile_kwarg_passthrough 
________________________

     def test_tifffile_kwarg_passthrough ():
>       img = imread(fetch('data/multipage.tif'), key=[1],
                      multifile=False, multifile_close=True, fastij=True,
                      is_ome=True)

/usr/lib/python3/dist-packages/skimage/io/tests/test_tifffile.py:41: _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ /usr/lib/python3/dist-packages/skimage/io/_io.py:48: in imread
     img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
/usr/lib/python3/dist-packages/skimage/io/manage_plugins.py:207: in 
call_plugin
     return func(*args, **kwargs)
/usr/lib/python3/dist-packages/skimage/io/_plugins/tifffile_plugin.py:30: in 
imread
     return tifffile_imread(fname, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _
files = '/usr/lib/python3/dist-packages/skimage/data/../data/multipage.tif'
aszarr = False
kwargs = {'fastij': True, 'key': [1], 'multifile': False, 
'multifile_close': True}
kwargs_file = {'is_ome': True}, kwargs_seq = {}
tif = <tifffile.TiffFile 'multipage.tif'>

     def imread(
         files: str
         | os.PathLike
         | FileHandle
         | BinaryIO
         | Sequence[str | os.PathLike]
         | None = None,
         *,
         aszarr: bool = False,
         **kwargs,
     ) -> numpy.ndarray | ZarrTiffStore | ZarrFileSequenceStore:
         """Return image data from TIFF file(s) as numpy array or zarr 
storage.
             Refer to the TiffFile and TiffSequence classes and their 
asarray
         functions for documentation.
             Parameters
         ----------
         files : path-like, binary stream, or sequence
             File name, seekable binary stream, glob pattern, or sequence of
             file names. May be None (default) if 'container' is specified.
         aszarr : bool
             If True, return file sequences, series, or single pages as
             zarr storage instead of numpy array (experimental).
         **kwargs
             Optional extra arguments.
             Parameters 'name', 'offset', 'size', and 'is_' flags are 
passed to
             TiffFile or TiffSequence.imread.
             Parameters 'imread', 'container', 'sort', 'pattern', 
'axesorder',
             and 'categories' are passed to TiffSequence.
             Other parameters are passed to the asarray or aszarr functions.
             The first image series in the file is returned if no 
arguments are
             provided.
             Returns
         -------
         numpy.ndarray or zarr storage
             Image data from the specified pages.
             Zarr storage instances must be closed after use.
             See TiffPage.asarray for operations that are applied (or not)
             to the raw data stored in the file.
             """
         kwargs_file = parse_kwargs(
             kwargs,
             'name',
             'offset',
             'size',
             # private
             '_multifile',
             '_useframes',
             # is_flags
             *(key for key in kwargs if key[:3] == 'is_'),
         )
         kwargs_seq = parse_kwargs(
             kwargs,
             'imread',
             'container',
             'sort',
             'pattern',
             'axesorder',
             'categories',
         )
             if kwargs_seq.get('container', None) is None:
             if isinstance(files, str) and ('*' in files or '?' in files):
                 files = glob.glob(files)
             if not files:
                 raise ValueError('no files found')
                 if (
                 isinstance(files, collections.abc.Sequence)
                 and not isinstance(files, str)
                 and len(files) == 1
             ):
                 files = files[0]
                 if isinstance(files, str) or not isinstance(
                 files, collections.abc.Sequence
             ):
                 with TiffFile(files, **kwargs_file) as tif:
                     if aszarr:
                         return tif.aszarr(**kwargs)
>                   return tif.asarray(**kwargs)
E                   TypeError: asarray() got an unexpected keyword 
argument 'multifile'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20220501/eb33a78b/attachment.sig>


More information about the debian-science-maintainers mailing list