当前文件所在盘符: E:
当前翻译的pdf名字 test1.pdf
正在翻译第1页...
Shipborne Robust Message Queuing Service
mupdf: cannot open E:\EasyTrans\trans/static/fonts/SimSun.ttf: No such file or directory
翻译过程出现异常......
E:\EasyTrans\trans\output_file\translated_test1.pdf
Traceback (most recent call last):
File "E:\Program Files\EasyTrans\trans_file.py", line 198, in
fontsize=fonts, align=text_pos) #
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\utils.py", line 1179, in insertTextbox
morph=morph)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\utils.py", line 2627, in insertTextbox
set_simple=set_simple,
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\fitz.py", line 3819, in insertFont
wmode, serif, encoding, CJK_number)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\fitz.py", line 3837, in _insertFont
return _fitz.Page__insertFont(self, fontname, bfname, fontfile, fontbuffer, set_simple, idx, wmode, serif, encoding, ordering)
RuntimeError: cannot open E:\EasyTrans\trans/static/fonts/SimSun.ttf: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Program Files\EasyTrans\trans_file.py", line 216, in
new_docx.save(new_docx_name) # 保存翻译后的docx
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\document.py", line 135, in save
self._part.save(path_or_stream)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\parts\document.py", line 111, in save
self.package.save(path_or_stream)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\opc\package.py", line 172, in save
PackageWriter.write(pkg_file, self.rels, self.parts)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\opc\pkgwriter.py", line 32, in write
phys_writer = PhysPkgWriter(pkg_file)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\opc\phys_pkg.py", line 141, in init
self._zipf = ZipFile(pkg_file, 'w', compression=ZIP_DEFLATED)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 1090, in init
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: 'E:\EasyTrans\trans\output_file\translated_test1.docx'
本人不会编程,照着教程操作了一下只能不停得到错误代码。 求做个一键翻译pdf,只用填api的版本。
当前文件所在盘符: E: 当前翻译的pdf名字 test1.pdf 正在翻译第1页... Shipborne Robust Message Queuing Service mupdf: cannot open E:\EasyTrans\trans/static/fonts/SimSun.ttf: No such file or directory 翻译过程出现异常...... E:\EasyTrans\trans\output_file\translated_test1.pdf Traceback (most recent call last): File "E:\Program Files\EasyTrans\trans_file.py", line 198, in
fontsize=fonts, align=text_pos) #
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\utils.py", line 1179, in insertTextbox
morph=morph)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\utils.py", line 2627, in insertTextbox
set_simple=set_simple,
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\fitz.py", line 3819, in insertFont
wmode, serif, encoding, CJK_number)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\fitz\fitz.py", line 3837, in _insertFont
return _fitz.Page__insertFont(self, fontname, bfname, fontfile, fontbuffer, set_simple, idx, wmode, serif, encoding, ordering)
RuntimeError: cannot open E:\EasyTrans\trans/static/fonts/SimSun.ttf: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "E:\Program Files\EasyTrans\trans_file.py", line 216, in
new_docx.save(new_docx_name) # 保存翻译后的docx
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\document.py", line 135, in save
self._part.save(path_or_stream)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\parts\document.py", line 111, in save
self.package.save(path_or_stream)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\opc\package.py", line 172, in save
PackageWriter.write(pkg_file, self.rels, self.parts)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\opc\pkgwriter.py", line 32, in write
phys_writer = PhysPkgWriter(pkg_file)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\site-packages\docx\opc\phys_pkg.py", line 141, in init
self._zipf = ZipFile(pkg_file, 'w', compression=ZIP_DEFLATED)
File "C:\Users\Jinyang Xie\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 1090, in init
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: 'E:\EasyTrans\trans\output_file\translated_test1.docx'