endpage pylatex 的问题

endpage pylatex 的问题

我正在运行一个程序来生成 pdf,但当我运行它时,它会生成 pdf,但也会提示错误。代码类似于这个但我只是添加了一些额外的行连接并添加了空格,例如+\n+

出现的错误是:Tkinter 回调中的异常

Traceback (most recent call last):
  File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py", line 1883, in __call__
    return self.func(*args)
  File "gobdipayun1.py", line 668, in validation
    doc.generate_pdf('Results_AY', clean_tex=False, compiler='pdflatex')
  File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylatex\document.py", line 247, in generate_pdf
    output = subprocess.check_output(command,
  File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pdflatex', '--interaction=nonstopmode', 'D:\\Relations\\Results_AY.tex']' returned non-zero exit status 1.
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.6.29)
entering extended mode
(D:/Relations/Results_AY.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-06-18>
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cl
s
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class

(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/base\size10.clo
))
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/base\fontenc.st
y)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/base\inputenc.s
ty)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/lm\lmodern.sty)

(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/base\textcomp.s
ty)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/lastpage\lastpa
ge.sty)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/parskip\parskip
.sty
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/kvoptions\kvopt
ions.sty
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval
.sty)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/generic/ltxcmds\ltxcm
ds.sty)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/generic/kvsetkeys\kvs
etkeys.sty))
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/etoolbox\etoolb
ox.sty))
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/geometry\geomet
ry.sty
(C:\Users\AppData\Local\Programs\MiKTeX\tex/generic/iftex\ifvtex.
sty
(C:\Users\AppData\Local\Programs\MiKTeX\tex/generic/iftex\iftex.s
ty))
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/geometry\geomet
ry.cfg))
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/booktabs\bookta
bs.sty)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/generic/babel\babel.s
ty
(C:\Users\AppData\Local\Programs\MiKTeX\tex/generic/babel\babel.d
ef
(C:\Users\AppData\Local\Programs\MiKTeX\tex/generic/babel\txtbabe
l.def))
*************************************
* Local config file bblopts.cfg used
*

(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/arabi\bblopts.c
fg)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/babel-spanish\s
panish.ldf))
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3bac
kend-pdfmode.def) (Results_AY.aux)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/lm\t1lmr.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/lm\ot1lmr.fd)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/lm\omllmm.fd)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/lm\omslmsy.fd)
(C:\Users\AppData\Local\Programs\MiKTeX\tex/latex/lm\omxlmex.fd)

! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.25 \newline
             %

Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 26--61


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99


Underfull \hbox (badness 10000) in paragraph at lines 65--99

[1{C:/Users/AppData/Local/MiKTeX/pdftex/config/pdftex.map}]

AED: lastpage setting LastPage
[2] (Results_AY.aux) )
(see the transcript file for additional information){C:/Users/App
Data/Local/Programs/MiKTeX/fonts/enc/dvips/lm/lm-ec.enc}<C:/Users/AppData/Local/Programs/MiKTeX/fonts/type1/public/lm/lmbx12.pfb><C:/Users/AppData/Local/Programs/MiKTeX/fonts/type1/public/lm/lmr10.pfb><C:/Users/AppData/Local/Programs/MiKTeX/fonts/type1/public/lm/lmr12.pfb><C:/Users/AppData/Local/Programs/MiKTeX/fonts/type1/public/lm/lmr1
7.pfb>
Output written on Results_AY.pdf (2 pages, 105938 bytes).
Transcript written on Resultados_AY_AGS.log.

相关内容