Skip to content

Commit fecaa6a

Browse files
authored
update ValueError message for wild card matching for remote files (#5851)
* update ValueError message for wild card matching * f string
1 parent e3f52ea commit fecaa6a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

xarray/backends/api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,10 +859,9 @@ def open_mfdataset(
859859
paths = [fs.get_mapper(path) for path in paths]
860860
elif is_remote_uri(paths):
861861
raise ValueError(
862-
"cannot do wild-card matching for paths that are remote URLs: "
863-
"{!r}. Instead, supply paths as an explicit list of strings.".format(
864-
paths
865-
)
862+
"cannot do wild-card matching for paths that are remote URLs "
863+
f"unless engine='zarr' is specified. Got paths: {paths}. "
864+
"Instead, supply paths as an explicit list of strings."
866865
)
867866
else:
868867
paths = sorted(glob(_normalize_path(paths)))

0 commit comments

Comments
 (0)