-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency file
Description
Describe the bug
When running the notebook StarDist_2D_ZeroCostDL4Mic, an error occurs due to the removal of the imsave function from the tifffile library in recent versions.
The error message
ImportError: cannot import name 'imsave' from 'tifffile' (/usr/local/lib/python3.11/dist-packages/tifffile/__init__.py)This happens because imsave was removed in tifffile version 2025.2.18. The recommended replacement is imwrite.
To Reproduce
- Open and run the StarDist_2D_ZeroCostDL4Mic notebook.
- Execute first and second cells of the notebook that intalls and imports
imsavefromtifffile. - The error appears, preventing further execution.
Expected behavior
The notebook should execute without errors.
Desktop:
- OS: Windows 11 Enterprise
- Browser: tested both in Chrome and Opera
Additional context
- The issue is due to a breaking change in
tifffile: Release notes. - A fix would be to replace
imsavewithimwritein the affected part of the notebook. - Alternatively and as a quick fix, users can downgrade
tifffileusing:
!pip install tifffile==2022.8.12but updating the notebook to use imwrite is the best long-term fix.
Metadata
Metadata
Assignees
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency file