diff --git a/monai/transforms/io/array.py b/monai/transforms/io/array.py index cd2d93a0c7..47017dad39 100644 --- a/monai/transforms/io/array.py +++ b/monai/transforms/io/array.py @@ -204,8 +204,10 @@ def __call__(self, filename: Union[Sequence[PathLike], PathLike], reader: Option break if img is None or reader is None: + if isinstance(filename, tuple) and len(filename) == 1: + filename = filename[0] raise RuntimeError( - f"can not find a suitable reader for file: {filename}.\n" + f"cannot find a suitable reader for file: {filename}.\n" " Please install the reader libraries, see also the installation instructions:\n" " https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies.\n" f" The current registered: {self.readers}.\n"