diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py index df2d7d9c..0a4933a7 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py @@ -292,7 +292,7 @@ class browserdialog(QDialog): if self.webviewv == 0: self.browser = winsharedutils.HTMLBrowser(int(self.winId())) elif self.webviewv == 1: - from webviewpy import Webview, declare_library_path + from webviewpy import Webview, declare_library_path, webview_exception declare_library_path( os.path.abspath( @@ -303,9 +303,11 @@ class browserdialog(QDialog): ) ) ) - self.browser = Webview( - False, int(self.winId()) - ) # 构造函数里会触发ResizeEvent。虽然确实有问题,但很奇怪前一天晚上正常,第二天起来就崩溃了。 + try: + self.browser = Webview(False, int(self.winId())) + except webview_exception: + self.browser = winsharedutils.HTMLBrowser(int(self.winId())) + self.webviewv == 0 self.setWindowTitle(savehook_new_data[self.exepath]["title"]) self.nettab = QTabWidget(self) self.nettab.setFixedHeight(self.nettab.tabBar().height()) diff --git a/LunaTranslator/requirements.txt b/LunaTranslator/requirements.txt index 8ab8d6d6..ff2a5314 100644 --- a/LunaTranslator/requirements.txt +++ b/LunaTranslator/requirements.txt @@ -1,6 +1,6 @@ PyQt5==5.15.10 PyQt5-Qt5==5.15.2 -webviewpy==1.0.1 +webviewpy==1.0.2 nuitka==2.0.5 imageio pefile \ No newline at end of file