votchallenge / toolkit

The official VOT Challenge evaluation and analysis toolkit
http://www.votchallenge.net/
GNU General Public License v3.0
153 stars 43 forks source link

Can not save to pdf #39

Open wang-tf opened 2 years ago

wang-tf commented 2 years ago

https://github.com/votchallenge/toolkit/blob/0c61b32d0711c238f71441f79e6af434ea3a7fcb/vot/document/latex.py#L133

There is an error if I want to generate a pdf format report.

Command '['latexmk', '--pdf', '--interaction=nonstopmode', '/tmp/tmpuqx_mb9_.tex']' returned non-zero exit status 12.

I think the reason is latexmk can not find some files generated before. So I have to change to like this

    if build:
        # temp = tempfile.mktemp()
        import os
        temp = os.path.join(storage.base, "report")
        logger.debug("Generating to tempourary output %s", temp)
        doc.generate_pdf(temp, clean_tex=True)
        # storage.copy(temp + ".pdf", "report.pdf")