zyddnys / manga-image-translator

Translate manga/image 一键翻译各类图片内文字 https://cotrans.touhou.ai/
https://cotrans.touhou.ai/
GNU General Public License v3.0
5.18k stars 534 forks source link

[Bug]: ERROR: [batch] ConfigKeyError: Missing key 0 #692

Open opza opened 2 months ago

opza commented 2 months ago

Issue

When executed, the following exception is thrown

ERROR: [batch] ConfigKeyError: Missing key 0 full_key: chat_sample.0 object_type=dict Traceback (most recent call last): File "D:\Dev\translator\manga_translator__main.py", line 73, in loop.run_until_complete(dispatch(args)) File "C:\Users\mingu\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "D:\Dev\translator\manga_translator\main__.py", line 42, in dispatch await translator.translate_path(path, dest, args_dict) File "D:\Dev\translator\manga_translator\manga_translator.py", line 178, in translate_path if await self.translate_file(file_path, output_dest, params): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Dev\translator\manga_translator\manga_translator.py", line 205, in translate_file return await self._translate_file(path, dest, ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Dev\translator\manga_translator\manga_translator.py", line 248, in _translate_file ctx = await self.translate(img, ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Dev\translator\manga_translator\manga_translator.py", line 305, in translate return await self._translate(ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Dev\translator\manga_translator\manga_translator.py", line 425, in _translate ctx.te

It was working fine before, but after the next commit it threw the above exception f64e383

Command Line Arguments

No response

Console logs

No response

zyddnys commented 2 months ago

what is your command line

opza commented 1 month ago

what is your command line

python -m manga_translator -v --translator=gpt4 -l KOR -i "MY_PATH" --gpt-config "gpt_config.txt" --force-horizontal --use-gpu --font-size-minimum 40 --upscale-ratio 2