Project-MONAI / Project-MONAI/MONAI
Print what package should be installed when suitable writer is missing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
Is your feature request related to a problem? Please describe.
I used SaveImage(..., output_ext=".png") but got this error message
monai.utils.module.OptionalImportError: No ImageWriter backend found for png.
This was after pip install monai in a clean environment.
Describe the solution you'd like
It would be great if the error message would include a description of how to fix the issue, e..g. "Please install pillow". Initially I installed simpleitk which also didn't have the png writer apparently, and I got the same error.
Describe alternatives you've considered
n/a
Additional context
Happened with monai==1.3.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SaveImage path that selects a writer and the OptionalImportError raised when no suitable backend is found. Trace how the requested output extension is matched to available writers and identify the existing tests for this error path. Done means a missing PNG writer explains which package to install, with coverage for the resulting message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100