Skip to content

Commit

Permalink
update ValueError message for wild card matching for remote files (py…
Browse files Browse the repository at this point in the history
…data#5851)

* update ValueError message for wild card matching

* f string
  • Loading branch information
raybellwaves authored and snowman2 committed Feb 9, 2022
1 parent 5f6e5e2 commit 3766893
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,9 @@ def open_mfdataset(
paths = [fs.get_mapper(path) for path in paths]
elif is_remote_uri(paths):
raise ValueError(
"cannot do wild-card matching for paths that are remote URLs: "
"{!r}. Instead, supply paths as an explicit list of strings.".format(
paths
)
"cannot do wild-card matching for paths that are remote URLs "
f"unless engine='zarr' is specified. Got paths: {paths}. "
"Instead, supply paths as an explicit list of strings."
)
else:
paths = sorted(glob(_normalize_path(paths)))
Expand Down

0 comments on commit 3766893

Please sign in to comment.