Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError no _plugin with custom Reader #66

Closed
sea-shunned opened this issue Aug 12, 2024 · 2 comments
Closed

AttributeError no _plugin with custom Reader #66

sea-shunned opened this issue Aug 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sea-shunned
Copy link

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 sea-shunned added the bug Something isn't working label Aug 12, 2024
@evamaxfield
Copy link
Contributor

evamaxfield commented Aug 21, 2024

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

@sea-shunned
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants