From 87a48c595539451dfc541c3f40c6cf4911bf2c1c Mon Sep 17 00:00:00 2001 From: SiYuan <863909694@qq.com> Date: Fri, 9 Feb 2024 17:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=BE=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/log/exception_handling.py | 2 +- app/util/exporter/output.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/log/exception_handling.py b/app/log/exception_handling.py index 7381eb8..ef2a14d 100644 --- a/app/log/exception_handling.py +++ b/app/log/exception_handling.py @@ -12,7 +12,7 @@ class ExceptionHanding: def parser_exc(self): if isinstance(self.exc_value, PermissionError): - return f'权限错误,请使用管理员身份运行' + return f'权限错误,请使用管理员身份运行并将文件夹设置为可读写' elif isinstance(self.exc_value, sqlite3.DatabaseError): return '数据库错误,请删除app文件夹后重启电脑再运行软件' elif isinstance(self.exc_value, OSError) and self.exc_value.errno == 28: diff --git a/app/util/exporter/output.py b/app/util/exporter/output.py index 9f6d3c4..655b862 100644 --- a/app/util/exporter/output.py +++ b/app/util/exporter/output.py @@ -310,7 +310,7 @@ class OutputMedia(QThread): self.time_range = time_range def run(self): - origin_path = os.path.join(os.path.abspath('../../DataBase'), output_dir, '聊天记录', self.contact.remark) + origin_path = os.path.join(os.getcwd(), output_dir, '聊天记录', self.contact.remark) messages = msg_db.get_messages_by_type(self.contact.wxid, 34, time_range=self.time_range) for message in messages: is_send = message[4]