Skip to content

pims.open fails to open a folder containing a single image using a glob pattern #452

@n-poulsen

Description

@n-poulsen

When attempting to open images in a folder as an ImageSequence, the module fails when there is a single image in the folder. I would expect the behavior to return an image sequence containing a single image.

Reproducing the issue with the data:

images/
  - img.png

Code:

glob_pattern = "images/*.png"
with pims.open(sfname) as imgs:
   ...

Stacktrace

File "pims/api.py", line 206, in open
    raise UnknownFormatError("All handlers returned exceptions:\n" + exceptions)
pims.api.UnknownFormatError: All handlers returned exceptions:
<class 'pims.image_reader.ImageReader'> errored: No such file: 'images/*.png'
<class 'pims.image_reader.ImageReaderND'> errored: No such file: 'images/*.png'
<class 'pims.imageio_reader.ImageIOReader'> errored: No such file: 'images/*.png'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions