From bb9790e8cf218be605459221902bab24f107b21e Mon Sep 17 00:00:00 2001 From: J Tan <144117656+dogganon@users.noreply.github.com> Date: Wed, 6 Aug 2025 23:34:52 -0400 Subject: [PATCH] Fix https://github.com/pydata/xarray/issues/10613 --- xarray/core/formatting_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/formatting_html.py b/xarray/core/formatting_html.py index 46c6709d118..6e790c3106f 100644 --- a/xarray/core/formatting_html.py +++ b/xarray/core/formatting_html.py @@ -81,7 +81,7 @@ def summarize_variable(name, var, is_index=False, dtype=None) -> str: variable = var.variable if hasattr(var, "variable") else var cssclass_idx = " class='xr-has-index'" if is_index else "" - dims_str = f"({', '.join(escape(dim) for dim in var.dims)})" + dims_str = f"({', '.join(escape(str(dim)) for dim in var.dims)})" name = escape(str(name)) dtype = dtype or escape(str(var.dtype))