From d3c0dfbf5b08ee857d91ac27b0be938288f0c392 Mon Sep 17 00:00:00 2001 From: Z User Date: Tue, 24 Mar 2026 06:00:38 +0000 Subject: [PATCH] Disable Jinja2 cache to fix hashing error --- moxie/web/routes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/moxie/web/routes.py b/moxie/web/routes.py index 5fa731a..fec98d0 100644 --- a/moxie/web/routes.py +++ b/moxie/web/routes.py @@ -21,7 +21,14 @@ from core.orchestrator import Orchestrator router = APIRouter() # Templates - use string path for better compatibility -templates = Jinja2Templates(directory=str(Path(__file__).parent / "templates")) +# Disable cache to avoid hashing issues with Pydantic objects +from jinja2 import Environment, FileSystemLoader +template_env = Environment( + loader=FileSystemLoader(str(Path(__file__).parent / "templates")), + autoescape=True, + cache_size=0, # Disable cache +) +templates = Jinja2Templates(env=template_env) def get_template_settings():