diff --git a/arraycontext/impl/pytato.py b/arraycontext/impl/pytato.py
index 9a54c00f48e12a1a82e7b06e4b33cc73ad77b805..459b76fdbfb71678bb54979e151d2554447205e6 100644
--- a/arraycontext/impl/pytato.py
+++ b/arraycontext/impl/pytato.py
@@ -191,7 +191,7 @@ def _ary_container_key_stringifier(keys: Tuple[Any, ...]) -> str:
     """
     def _rec_str(key: Any) -> str:
         if isinstance(key, (str, int)):
-            return key
+            return str(key)
         elif isinstance(key, tuple):
             return "tup" + "_".join(_rec_str(k) for k in key) + "endtup"
         else: