Skip to content

Bug: PythonReader breaks with tifffile>=2026.9.20 (TiffFrame has no attribute '_nextifd') #131

Closed

Description

@BrianWhitneyAI

Reading a tiled OME-TIFF with the python backend fails with tifffile 2026.9.20 or newer.

Versions: bfio 2.5.0, Python 3.12, tifffile 2026.11.16 (2026.9.15 works)

Repro

Any tiled OME-TIFF reproduces it, e.g. actk_ome_tiff_tiles.ome.tif (from bioio-ome-tiled-tiff's test resources).

pip install bfio==2.5.0 tifffile==2026.11.16
from bfio import BioReader
with BioReader("actk_ome_tiff_tiles.ome.tif", backend="python") as br:
    br[:]

Error

bfio/backends.py", line 173, in get_offset
    return self._tiff_frame._nextifd()
AttributeError: 'TiffFrame' object has no attribute '_nextifd'

Cause

_TiffBytesOffsets.get_offset calls the private method tifffile.TiffFrame._nextifd(). It was removed in tifffile 2026.9.20. I bisected: 2026.9.15 passes, 2026.9.20 fails. bfio only requires tifffile>=2022.8.12, so fresh installs pick up the broken version.

This looks like the same kind of break as #42 (TiffBytesOffsets vs tifffile.TiffFrame after 2022.4.22).

Suggested fix

Stop depending on the private _nextifd() (e.g. use public tifffile APIs for the IFD offset). In the meantime an upper bound on tifffile would stop new installs breaking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions