Closed emmcb closed 1 month ago
Currently calling read_image(path) with path a pathlib.Path objects fails with the following error:
read_image(path)
pathlib.Path
Traceback (most recent call last): File "/home/emmanuel/.local/lib/python3.12/site-packages/cxx_image_io/io.py", line 49, in read_image metadata = parser.readMetadata(image_path, metadata_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: readMetadata(): incompatible function arguments. The following argument types are supported: 1. (arg0: str, arg1: Optional[str]) -> Optional[cxx_image.ImageMetadata] Invoked with: _PosixPath('...'), None
read_image(str(path)) works as a workaround, but it should probably be better if Path were directly supported.
read_image(str(path))
Please try it with new v0.0.10, I changed it to patlib.Path
https://pypi.org/project/cxx-image-io/0.0.10/
Thanks it works fine!
Currently calling
read_image(path)
with path apathlib.Path
objects fails with the following error:read_image(str(path))
works as a workaround, but it should probably be better if Path were directly supported.