-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-HTTPS remote URLs no longer work as input for open_zarr #4691
Comments
cc @martindurant for fsspec issue |
I believe #4461 fixes this Note that you can still use the "old" method of opening the mapper (e.g., fsspec.get_mapper) beforehand and passing that |
Good to know - I figured this issue would be covered in that PR. In general, I tend to use |
#4823 working on this. Please try and comment. |
With @martindurant's PR merged, this should be fixed now - thanks! |
What happened:
On 0.16.2 and later, passing a non-HTTPS remote URL path (e.g.
gs://...
) as input toopen_zarr()
results in aKeyError
orGroupNotFoundError
:What you expected to happen:
With versions 0.16.1 and earlier, passing a non-HTTPS remote URL path to
open_zarr()
as input would successfully open the remote store, provided that a package to handle the specific filesystem was available in the environment and the proper storage options were supplied.Minimal Complete Verifiable Example:
Same as above, but with
decode_times=False
to circumvent a cftime dependency:Anything else we need to know?:
From a brief debug of the code, it looks like this error is a result of
open_zarr()
now callingopen_dataset(engine="zarr")
to open the Zarr store.In this function, the remote URL path is now passed through
_normalize_path()
where it is not recognized as a remote URL (this check is done byis_remote_uri()
which only checks for HTTPS) and is instead interpreted as a relative path in the local filesystem, where it does not exist.I'm not sure if this meant to be expected behavior, as the documentation on reading datasets in the cloud does not show an example using a URL path as input, and only suggests to use a
MutableMapping
. However, this is a use case that worked before 0.16.2, and now no longer works.I think this could be resolved by expanding
is_remote_uri()
to check for other common remote URIs (e.g.gs:
,s3:
, etc.).Environment:
Output of xr.show_versions()
The text was updated successfully, but these errors were encountered: