From 80a3e79724fac167678cc7ea16e9f80820da6feb Mon Sep 17 00:00:00 2001 From: dongchangxi <458593490@qq.com> Date: Mon, 4 Aug 2025 18:16:27 +0800 Subject: [PATCH] 1 --- timer/external_order_glbV2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timer/external_order_glbV2.py b/timer/external_order_glbV2.py index 2f3e53c..1389710 100644 --- a/timer/external_order_glbV2.py +++ b/timer/external_order_glbV2.py @@ -89,7 +89,7 @@ def checkDownloadFile(pid): mtlfilePath = os.path.join(config.workdir, "print", pid,f"{pid}.mtl") objfilePath = os.path.join(config.workdir, "print", pid,f"{pid}.obj") #读取该笔文件的mtl文件 - with open(mtlfilePath, 'r') as file: + with open(mtlfilePath, 'r',encoding='utf-8') as file: mtlContent = file.read() #检测mtl文件是否正常 if mtlContent == "": @@ -108,7 +108,7 @@ def checkDownloadFile(pid): #检测obj文件 里 是否包含 o {pid}, isContain = False - with open(objfilePath, 'r') as file: + with open(objfilePath, 'r',encoding='utf-8') as file: for line in file: if line.startswith(f'o {pid}'): isContain = True