The package .resolve method uses fsspec._open under the hood, which fails if the file in question is interpreted as a directory, as is the case with Zarr stores.
store = package.resolve('metadata.zarr')
package.resolve("metadata.zarr")
File "/usr/local/lib/python3.10/dist-packages/earth2studio/models/auto.py", line 319, in resolve
with self.open(file_path) as file:
File "/usr/local/lib/python3.10/dist-packages/earth2studio/models/auto.py", line 301, in open
return self.fs.open(full_path, callback=callback)
File "/usr/local/lib/python3.10/dist-packages/fsspec/spec.py", line 1293, in open
f = self._open(
File "/usr/local/lib/python3.10/dist-packages/fsspec/implementations/local.py", line 197, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/fsspec/implementations/local.py", line 322, in __init__
self._open()
File "/usr/local/lib/python3.10/dist-packages/fsspec/implementations/local.py", line 327, in _open
self.f = open(self.path, mode=self.mode)
IsADirectoryError: [Errno 21] Is a directory: '/path/to/file/metadata.zarr'
Updating to feature request, doing this on NGC will potentially be quite challenging due to how file access works... specifically for authenticated users.
Version
main
On which installation method(s) does this occur?
Pip, Source
Describe the issue
The package
.resolve
method usesfsspec._open
under the hood, which fails if the file in question is interpreted as a directory, as is the case with Zarr stores.