Skip to content

Commit

Permalink
Edit serialization error message
Browse files Browse the repository at this point in the history
Fixes #4926
  • Loading branch information
VeckoTheGecko committed Dec 25, 2024
1 parent 0c6cded commit 34c754d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ def check_name(name: Hashable):
raise ValueError(
f"Invalid name {name!r} for DataArray or Dataset key: "
"string must be length 1 or greater for "
"serialization to netCDF files"
"serialization to netCDF or zarr files"
)
elif name is not None:
raise TypeError(
f"Invalid name {name!r} for DataArray or Dataset key: "
"must be either a string or None for serialization to netCDF "
"files"
"or zarr files"
)

for k in dataset.variables:
Expand Down

0 comments on commit 34c754d

Please sign in to comment.