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

incorrect error message when reader is specified in LoadImage #3787

Closed
wyli opened this issue Feb 10, 2022 · 1 comment
Closed

incorrect error message when reader is specified in LoadImage #3787

wyli opened this issue Feb 10, 2022 · 1 comment
Assignees

Comments

@wyli
Copy link
Contributor

wyli commented Feb 10, 2022

Describe the bug

from monai.transforms import LoadImage

LoadImage(reader="itkreader")("noname")

current message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/Documents/MONAI/monai/transforms/io/array.py", line 210, in __call__
    f"cannot find a suitable reader for file: {filename}.\n"
RuntimeError: cannot find a suitable reader for file: noname.
    Please install the reader libraries, see also the installation instructions:
    https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies.
   The current registered: [<monai.data.image_reader.ITKReader object at 0x7f806d04b090>, <monai.data.image_reader.NumpyReader object at 0x7f806c8b2210>, <monai.data.image_reader.PILReader object at 0x7f8060942e90>, <monai.data.image_reader.NibabelReader object at 0x7f8099395b10>, <monai.data.image_reader.ITKReader object at 0x7f806d045e50>].

but the file noname doesn't exist.

@wyli wyli self-assigned this Feb 10, 2022
@wyli
Copy link
Contributor Author

wyli commented Feb 10, 2022

including a patch in #3773

wyli added a commit to wyli/MONAI that referenced this issue Feb 10, 2022
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli closed this as completed in 127e823 Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant