From b9cdd95eea3b7b487dd767f8557839f8831b756c Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Tue, 6 Aug 2024 16:20:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E9=94=99=E8=AF=AF=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=B5=B7=E6=9D=A5=E6=96=B9=E4=BE=BF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_mask_error_report.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/photo_mask_error_report.py b/photo_mask_error_report.py index 702c3ea..4cf8507 100644 --- a/photo_mask_error_report.py +++ b/photo_mask_error_report.py @@ -1,3 +1,4 @@ +import json from collections import defaultdict from datetime import date, timedelta @@ -38,3 +39,7 @@ if __name__ == '__main__': session.close() result[error_descript] += 1 print(result) + with open("photo_mask_error_report.txt", 'w', encoding='utf-8') as file: + file.write(json.dumps(result, indent=4, ensure_ascii=False)) + file.write(util.get_default_datetime()) + print("结果已保存。")