NEKOparapa / AiNiee

一款专注于Ai翻译的工具,可以用来一键自动翻译RPG SLG游戏,Epub Word TXT小说,Srt Vtt Lrc字幕等等。
GNU General Public License v3.0
1.4k stars 77 forks source link

[Feature] GlossaryChecker插件报错导致无法完成翻译 版本:AiNiee-Beta #356

Closed GuGuMao8698 closed 1 week ago

GuGuMao8698 commented 1 week ago

使用KeywordGacha导入指令词典,在完成全部翻译后,报错如下: { [GlossaryChecker] 开始执行后处理 ...

0%| | 0/485 [00:00<?, ?it/s] Exception in thread Thread-3 (translation_start_target): Traceback (most recent call last): File "threading.py", line 1075, in _bootstrap_inner File "threading.py", line 1012, in run File "Module_Folders\Translator.py", line 280, in translation_start_target File "Module_Folders\Translator.py", line 327, in translation_post_process File "Base\PluginManager.py", line 45, in broadcast_event File "F:\Download\AiNiee-Beta\dist\Plugin_Scripts\GlossaryChecker\GlossaryChecker.py", line 50, in on_event self.on_postprocess_text(event, configurator, data, items, project) File "F:\Download\AiNiee-Beta\dist\Plugin_Scripts\GlossaryChecker\GlossaryChecker.py", line 74, in on_postprocess_text source_text_replaced = self.replace_name_code(source_text, names, nicknames) ^^^^^ UnboundLocalError: cannot access local variable 'names' where it is not associated with a value }

neavo commented 1 week ago

使用KeywordGacha导入指令词典,在完成全部翻译后,报错如下: { [GlossaryChecker] 开始执行后处理 ...

0%| | 0/485 [00:00<?, ?it/s] Exception in thread Thread-3 (translation_start_target): Traceback (most recent call last): File "threading.py", line 1075, in _bootstrap_inner File "threading.py", line 1012, in run File "Module_Folders\Translator.py", line 280, in translation_start_target File "Module_Folders\Translator.py", line 327, in translation_post_process File "Base\PluginManager.py", line 45, in broadcast_event File "F:\Download\AiNiee-Beta\dist\Plugin_Scripts\GlossaryChecker\GlossaryChecker.py", line 50, in on_event self.on_postprocess_text(event, configurator, data, items, project) File "F:\Download\AiNiee-Beta\dist\Plugin_Scripts\GlossaryChecker\GlossaryChecker.py", line 74, in on_postprocess_text source_text_replaced = self.replace_name_code(source_text, names, nicknames) ^^^^^ UnboundLocalError: cannot access local variable 'names' where it is not associated with a value }

已修,https://github.com/NEKOparapa/AiNiee/pull/357