_fsspec_safe_open: open_kwargs as storage_options
MODIFY
pangeo_forge_recipes/storage.py
pangeo_forge_recipes/storage.py
@@ -27,7 +27,7 @@ def _get_url_size(fname, **open_kwargs):
@contextmanager
def _fsspec_safe_open(fname: str, **kwargs) -> Iterator[OpenFileType]:
fs, _, paths = fsspec.get_fs_token_paths(
- fname, mode="rb", **{k: v for k, v in kwargs.items() if k != "mode"}
+ fname, mode="rb", storage_options={k: v for k, v in kwargs.items() if k != "mode"}
)
path = paths[0]
logger.debug(f"_fsspec_safe_open opening {path} with fs {fs}")

_fsspec_safe_open: open_kwargs as storage_options