From c473f6c6028716e30d662aa024ca22c34a177f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Tue, 21 May 2024 19:53:58 +0800 Subject: [PATCH] issues/758 --- LunaTranslator/LunaTranslator/gui/inputdialog.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/inputdialog.py b/LunaTranslator/LunaTranslator/gui/inputdialog.py index 58d17b61..9b15465d 100644 --- a/LunaTranslator/LunaTranslator/gui/inputdialog.py +++ b/LunaTranslator/LunaTranslator/gui/inputdialog.py @@ -273,8 +273,12 @@ class autoinitdialog(QDialog): lineW.button(QDialogButtonBox.Ok).setText(_TR("确定")) lineW.button(QDialogButtonBox.Cancel).setText(_TR("取消")) elif line["type"] == "lineedit": - lineW = QLineEdit(dd[key]) - regist.append([dd, key, lineW.text]) + try: + lineW = QLineEdit(dd[key]) + regist.append([dd, key, lineW.text]) + except: + #被废弃的参数若为int型但失去argstype注释会崩溃,直接continue; + continue elif line["type"] == "file": e = QLineEdit(dd[key]) regist.append([dd, key, e.text])