From d5a851ac572978e5a2b3b78d1905873fe35bb796 Mon Sep 17 00:00:00 2001 From: jinye_huang Date: Mon, 4 Aug 2025 13:51:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=BC=A9=E8=BF=9B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/services/poster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services/poster.py b/api/services/poster.py index 19045fd..b72d16c 100644 --- a/api/services/poster.py +++ b/api/services/poster.py @@ -672,10 +672,10 @@ class PosterService: # 生成JSON的base64编码 json_base64 = None - try: + try: json_string = json.dumps(fabric_json, ensure_ascii=False) json_base64 = base64.b64encode(json_string.encode('utf-8')).decode('utf-8') - except Exception as e: + except Exception as e: logger.warning(f"生成JSON base64编码失败: {e}") logger.info(f"Fabric.js JSON文件生成成功: {json_path} ({file_size/1024:.1f}KB)")