Open ashiklom opened 4 hours ago
Trying to pass a pathlib.Path object to Kerchunk fails with "type of input h5f not recognised", presumably because in this conditional, isinstance(Path("something"), str) == False.
pathlib.Path
"type of input h5f not recognised"
isinstance(Path("something"), str) == False
https://github.com/fsspec/kerchunk/blob/718ab9c3a18ea79973cae987fac2456d6590ab97/kerchunk/hdf.py#L94-L108
Suggest instead: isinstance(h5f, (pathlib.Path, str))
isinstance(h5f, (pathlib.Path, str))
OK, that change will work.
Trying to pass a
pathlib.Path
object to Kerchunk fails with"type of input h5f not recognised"
, presumably because in this conditional,isinstance(Path("something"), str) == False
.https://github.com/fsspec/kerchunk/blob/718ab9c3a18ea79973cae987fac2456d6590ab97/kerchunk/hdf.py#L94-L108
Suggest instead:
isinstance(h5f, (pathlib.Path, str))