bioio icon indicating copy to clipboard operation
bioio copied to clipboard

`AttributeError` no `_plugin` with custom `Reader`

Open sea-shunned opened this issue 1 year ago • 1 comments

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

sea-shunned avatar Aug 12 '24 15:08 sea-shunned

I think we would happily accept a pull request for this one! Thanks for finding the issue!

evamaxfield avatar Aug 21 '24 22:08 evamaxfield

Apologies for the delay, but looks like this was fixed in #67, so closing!

sea-shunned avatar Sep 20 '24 12:09 sea-shunned