From a1cc2f733ce3471870176e2fa6f76dcd67755c14 Mon Sep 17 00:00:00 2001 From: binary-husky Date: Thu, 14 Sep 2023 15:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dnougat=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E9=94=81=E9=87=8A=E6=94=BEBug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/crazy_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crazy_functions/crazy_utils.py b/crazy_functions/crazy_utils.py index 6cf471e..66c53a9 100644 --- a/crazy_functions/crazy_utils.py +++ b/crazy_functions/crazy_utils.py @@ -731,9 +731,10 @@ class nougat_interface(): from toolbox import get_log_folder, gen_time_str dst = os.path.join(get_log_folder(plugin_name='nougat'), gen_time_str()) os.makedirs(dst) - self.nougat_with_timeout(f'nougat --out "{os.path.abspath(dst)}" "{os.path.abspath(fp)}"', os.getcwd()) + self.nougat_with_timeout(f'nougat --out "{os.path.abspath(dst)}" "{os.path.abspath(fp)}"', os.getcwd(), timeout=300) res = glob.glob(os.path.join(dst,'*.mmd')) if len(res) == 0: + self.threadLock.release() raise RuntimeError("Nougat解析论文失败。") self.threadLock.release() return res[0]