From fecaa6a4ad867d9f1696987e7181a86214508c9d Mon Sep 17 00:00:00 2001 From: Ray Bell Date: Sun, 10 Oct 2021 22:58:46 -0400 Subject: [PATCH] update ValueError message for wild card matching for remote files (#5851) * update ValueError message for wild card matching * f string --- xarray/backends/api.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xarray/backends/api.py b/xarray/backends/api.py index b85b5015553..6d73946bb59 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -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)))