-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Before you asking
- I have searched the existing issues
- I spend at least 5 minutes for thinking and preparing
- I have thoroughly and completely read the wiki.
- I have carefully checked the issue, and it is unrelated to the network environment.
Environment
- OS: Arch Linux
- Python: 3.12.9
- pdf2zh: 1.8.9Describe the bug
When using custom prompt templates, the translation progress does not advance (indicated by consistently appearing ambiguous error messages) and I repeatedly attempt to translate, as shown in the figure below:
It's unrelated to the model (I've tried command-r7b and qwen2.5); it also has nothing to do with the prompt template format (I have tried removing the commas at the end of the fourth and eighth lines), and here is the prompt template:
To Reproduce
- Visit the website and use the keyboard shortcut
Ctrl + Pto save the website content as a PDF file. - Run the following command:
pdf2zh Understanding\ the\ Python\ Mock\ Object\ Library\ –\ Real\ Python.pdf -li en -lo zh --prompt pdf2zh-prompt.txt -s ollama:huihui_ai/command-r7b-abliterated:latest - An error occurs when translating to page five.
Expected behavior
Translate the entire PDF and provide the user with a clear error message even if an error occurs. 😅
Relevant log output
invalid syntax. Perhaps you forgot a comma? (<string>, line 8)
ERROR:pdf2zh.converter:All models failed
invalid syntax. Perhaps you forgot a comma? (<string>, line 8)
ERROR:pdf2zh.converter:All models failed
invalid syntax. Perhaps you forgot a comma? (<string>, line 8)
ERROR:pdf2zh.converter:All models failed
......
Origin PDF file
No response
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

