Skip to content

Commit

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

* update ValueError message for wild card matching

* f string
  • Loading branch information
raybellwaves authored Oct 11, 2021
1 parent e3f52ea commit fecaa6a
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 fecaa6a

Please sign in to comment.