Evil0ctal / Evil0ctal/Minecraft-Plugin-AI-Translater

翻译出现格式问题

Open
#10 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
25
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
1部分翻译失败:Invalid line format: ```yaml
如果再次失败,请检查文件内容。
The 1 part of the translation failed: Invalid line format: ```yaml
If it fails again, please check the file content.
Traceback (most recent call last):
File "e:\ChatGPT-Minecraft-Plugin-Translater-2.0\ChatGPT-Minecraft-Plugin-Translater-2.0\main.py", line 166, in process_file
translated_content = parser.to_yaml(translated_part)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Teaftc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkvpm\parser.py", line 214, in to_yaml
path, value, value_type = self.process_translation_line(line)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Teaftc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkvpm\parser.py", line 96, in process_translation_line
raise ValueError(f"Invalid line format: {line}")
ValueError: Invalid line format: ```yaml

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "e:\ChatGPT-Minecraft-Plugin-Translater-2.0\ChatGPT-Minecraft-Plugin-Translater-2.0\main.py", line 276, in
main(_output_language=output_language,
File "e:\ChatGPT-Minecraft-Plugin-Translater-2.0\ChatGPT-Minecraft-Plugin-Translater-2.0\main.py", line 236, in main
translated_count = process_directory(_input_path, _model, _output_language, _max_tokens, _output_path, log_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "e:\ChatGPT-Minecraft-Plugin-Translater-2.0\ChatGPT-Minecraft-Plugin-Translater-2.0\main.py", line 218, in process_directory
process_file(file_path, _model, _output_language, _max_tokens, output_folder, log_path)
File "e:\ChatGPT-Minecraft-Plugin-Translater-2.0\ChatGPT-Minecraft-Plugin-Translater-2.0\main.py", line 176, in process_file
translated_content = parser.to_yaml(translated_part)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Teaftc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkvpm\parser.py", line 214, in to_yaml
path, value, value_type = self.process_translation_line(line)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Teaftc\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkvpm\parser.py", line 96, in process_translation_line
raise ValueError(f"Invalid line format: {line}")
ValueError: Invalid line format: ``
[diversity.txt](https://github.com/user-attachments/files/17879623/diversity.txt)
`yaml
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.