dongchangxi 5 months ago
parent
commit
80a3e79724
  1. 4
      timer/external_order_glbV2.py

4
timer/external_order_glbV2.py

@ -89,7 +89,7 @@ def checkDownloadFile(pid): @@ -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): @@ -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

Loading…
Cancel
Save