From 1a7d93acde20dc5d0bc06fd28808a3a97f92e485 Mon Sep 17 00:00:00 2001 From: shuaikangzhou <863909694@qq.com> Date: Sun, 17 Dec 2023 22:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BD=91=E7=BB=9C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=9A=84=E9=97=AE=E9=A2=98#156=20#150?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/DataBase/output_pc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/DataBase/output_pc.py b/app/DataBase/output_pc.py index e9f026a..0dc8f88 100644 --- a/app/DataBase/output_pc.py +++ b/app/DataBase/output_pc.py @@ -251,8 +251,11 @@ class ChildThread(QThread): return image_path = path.get_relative_path(image_path, base_path=f'/data/聊天记录/{self.contact.remark}/image') image_path = image_path.replace('/', '\\') - os.utime(origin_docx_path + image_path[1:], (timestamp, timestamp)) - print(origin_docx_path + image_path[1:]) + try: + os.utime(origin_docx_path + image_path[1:], (timestamp, timestamp)) + except: + print("网络图片",image_path) + pass image_path = image_path.replace('\\', '/') # print(f"tohtml:---{image_path}") if self.is_5_min(timestamp):