From af9878d831f4e119eba6c55046e3313574ff081d Mon Sep 17 00:00:00 2001 From: Robert Dargavel Smith Date: Thu, 5 Sep 2024 09:27:25 +0100 Subject: [PATCH] fix decode error --- backend/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/main.py b/backend/main.py index 4a001f6..0b380e1 100644 --- a/backend/main.py +++ b/backend/main.py @@ -127,6 +127,8 @@ class HTMLCoder(JsonCoder): def decode(cls, value): """Decode HTMLResponse. """ + if isinstance(value, str): + value = value.encode("utf-8") response = JsonCoder.decode(value) return HTMLResponse(content=response['body'], status_code=response['status_code'])