You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Raise the exception when LoadImage has a reader specified but it is not installed #7437
Describe the bug
Running LoadImage(reader="ITKReader") without itk installed will just warn that itk is not installed and will proceed with using PILReader instead.
Hi @its-serah, @abishop1990, and @haoyu-haoyu thanks all for addressing this issue. Sorry for the delays in getting to reviewing these, we've had a lot of other things blocking other progress as well. I think the three proposals all have their merits that we should combine together as the solutions are all quite similar. @its-serah's implementation was farthest along though we didn't figure out all the CI issues so didn't merge, @abishop1990 your solution has more user-friendly wording, @haoyu-haoyu the install hints are useful as well.
I'd propose that @its-serah finish #8522 to fix the formatting complaint and the DCO issue. With that done either we merge PRs from @abishop1990 (#8768) and @haoyu-haoyu (#8771) after updates or you two collaborate on @its-serah's fork (if you are ok with that @its-serah). I want to get all your changes in and give you all contribution credit so please bear with us, thanks!
I agree #8989 / #9142 is the better direction. I'm happy to close #8795 in favour of those. Once the pkg_name mechanism is merged I can rebase #8796 onto it for the reader side, or close it too, whichever you prefer.
Activity
Bhavay-2001 commentedon Feb 6, 2024
Hi @KumoLiu, I would like to work on this issue instead. Can you please guide me through this?
Project-MONAI#7437 issue: Raise ModuleNotFoundError for missing depen…
KumoLiu commentedon Mar 8, 2024
Hi @girishsenthil,, free feel to create a PR, here is the contribution guide.
https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md
Thanks.
KumoLiu commentedon Mar 23, 2024
Hi @girishsenthil, Thanks for all the hard work you've put in! I would like to recommend that you submit a PR in this repository, rather than your own. Please follow these steps:
https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md#submitting-pull-requests
Thanks!
Fix LoadImage to raise OptionalImportError when specified reader is n…
fix: raise exception when LoadImage reader is specified but not insta…
fix: update test_load_image to skip explicit readers in min-dep envir…
Raise exception when user-specified reader package is not installed
Raise exception when user-specified reader package is not installed
Raise exception when user-specified reader package is not installed
Raise exception when user-specified reader package is not installed
ericspod commentedon Mar 29, 2026
Hi @its-serah, @abishop1990, and @haoyu-haoyu thanks all for addressing this issue. Sorry for the delays in getting to reviewing these, we've had a lot of other things blocking other progress as well. I think the three proposals all have their merits that we should combine together as the solutions are all quite similar. @its-serah's implementation was farthest along though we didn't figure out all the CI issues so didn't merge, @abishop1990 your solution has more user-friendly wording, @haoyu-haoyu the install hints are useful as well.
I'd propose that @its-serah finish #8522 to fix the formatting complaint and the DCO issue. With that done either we merge PRs from @abishop1990 (#8768) and @haoyu-haoyu (#8771) after updates or you two collaborate on @its-serah's fork (if you are ok with that @its-serah). I want to get all your changes in and give you all contribution credit so please bear with us, thanks!
fix(LoadImage): raise OptionalImportError when user-specified reader …
vikasreddy11 commentedon May 13, 2026
Hi, I'd like to work on this.
Raise OptionalImportError for unavailable explicit image readers (#9006)
Talhax55z commentedon Oct 1, 2026
I agree #8989 / #9142 is the better direction. I'm happy to close #8795 in favour of those. Once the pkg_name mechanism is merged I can rebase #8796 onto it for the reader side, or close it too, whichever you prefer.