Repository navigation
Raise the exception when LoadImage has a reader specified but it is not installed #7437
Description
Activity
- addedenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
on Feb 5, 2024 Hi @KumoLiu, I would like to work on this issue instead. Can you please guide me through this?
Hi @girishsenthil,, free feel to create a PR, here is the contribution guide.
https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md
Thanks.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-requestsThanks!
- added a commit that references this issue
on Jul 29, 2025 - added 2 commits that reference this issue
on Mar 7, 2026 - added 4 commits that reference this issue
on Mar 11, 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!
- added a commit that references this issue
on Apr 12, 2026 Hi, I'd like to work on this.
- added a commit that references this issue
on Aug 14, 2026
Describe the bug
Running
LoadImage(reader="ITKReader")withoutitkinstalled will just warn thatitkis not installed and will proceed with usingPILReaderinstead.MONAI/monai/transforms/io/array.py
Line 185 in 33afaef
Expected behavior
If the specified reader is not installed, an exception should be raised.