diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index cb3ab375c31..d7f056a209a 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -1135,9 +1135,7 @@ def set_variables(self, variables, check_encoding_set, writer, unlimited_dims=No else: encoded_attrs[DIMENSION_KEY] = dims - encoding["exists_ok" if _zarr_v3() else "overwrite"] = ( - True if self._mode == "w" else False - ) + encoding["overwrite"] = True if self._mode == "w" else False zarr_array = self._create_new_array( name=name,