bioio
bioio copied to clipboard
`AttributeError` no `_plugin` with custom `Reader`
Describe the Bug
When trying to print/display a BioImage when passing a custom reader, there is no _plugin attribute set:
AttributeError: 'BioImage' object has no attribute '_plugin'
This is because self._plugin is not set in the else clause here: https://github.com/bioio-devs/bioio/blob/main/bioio/bio_image.py#L267-L279
Happy to fix it if you want!
Expected Behavior
Should be able to print in both cases!
Reproduction
from bioio import BioImage
import bioio_tifffile
img = BioImage("my_file.tiff")
print(img) # All good
img = BioImage("my_file.tiff", reader=bioio_tifffile.Reader)
print(img) # AttributeError
Environment
- OS Version: macOS 14.6
- bioio Version: 1.0.3
I think we would happily accept a pull request for this one! Thanks for finding the issue!
Apologies for the delay, but looks like this was fixed in #67, so closing!