Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-12569

Missing pandoc in Travis docs build


    • Templates:
    • Story Points:
    • Team:


      When I push to LDM-534, a Travis build is started and (apparently) runs successfully. However, the new version of the document doesn't appear at https://ldm-534.lsst.io/v/.

      On further investigation, Lander is failing as follows:

      5.62s$ lander --pdf LDM-534*.pdf --upload --lsstdoc LDM-534.tex --env=[secure] --ltd-product $PRODUCT --handle $HANDLE --title "$TITLE"
      2017-11-09 03:35:38,557     INFO lander.main | Lander version 0.1.8
      Maybe try:
          sudo apt-get install pandoc
      See http://johnmacfarlane.net/pandoc/installing.html
      for installation options
      2017-11-09 03:35:38,575  WARNING metasrc.pandoc.convert | pandoc needed but not found. Now installing it for you.
      tar (child): data.tar.gz: Cannot open: No such file or directory
      tar (child): Error is not recoverable: exiting now
      tar: Child returned status 2
      tar: Error is not recoverable: exiting now
      * Downloading pandoc from https://github.com/jgm/pandoc/releases/download/ ...
      * Unpacking pandoc- to tempfolder...
      Traceback (most recent call last):
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/metasrc/pandoc/convert.py", line 24, in _install_and_run
          result = func(*args, **kwargs)
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/metasrc/pandoc/convert.py", line 124, in convert_text
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/pypandoc/__init__.py", line 103, in convert_text
          outputfile=outputfile, filters=filters)
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/pypandoc/__init__.py", line 260, in _convert_input
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/pypandoc/__init__.py", line 544, in _ensure_pandoc_path
          raise OSError("No pandoc was found: either install pandoc and add it\n"
      OSError: No pandoc was found: either install pandoc and add it
      to your PATH or or call pypandoc.download_pandoc(...) or
      install pypandoc wheels with included pandoc.
      During handling of the above exception, another exception occurred:
      Traceback (most recent call last):
        File "/home/[secure]/virtualenv/python3.5.3/bin/lander", line 11, in <module>
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/lander/main.py", line 185, in main
          config = Configuration(args=args)
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/lander/config.py", line 91, in __init__
          self['title_html'] = lsstdoc.html_title
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/metasrc/tex/lsstdoc.py", line 79, in html_title
          mathjax=False, smart=True)
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/metasrc/tex/lsstdoc.py", line 281, in format_title
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/metasrc/pandoc/convert.py", line 190, in convert_lsstdoc_tex
          smart=smart, extra_args=extra_args)
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/metasrc/pandoc/convert.py", line 29, in _install_and_run
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/pypandoc/pandoc_download.py", line 207, in download_pandoc
          unpack(filename, targetfolder)
        File "/home/[secure]/virtualenv/python3.5.3/lib/python3.5/site-packages/pypandoc/pandoc_download.py", line 86, in _handle_linux
        File "/opt/python/3.5.3/lib/python3.5/subprocess.py", line 271, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['tar', 'xzf', 'data.tar.gz']' returned non-zero exit status 2

      This is due to a known issue with pypandoc, which attempts (and fails) to install pandoc for itself if it doesn't already exist.

      I also tried installing my own pandoc using APT. That doesn't help:

      RuntimeError: Pandoc died with exitcode "2" during conversion: b"pandoc: unrecognized option `--wrap=none'\nTry pandoc --help for more information.\n"

      I guess this tells us that pypandoc is assuming some version of pandoc other than that provided by the Ubuntu repository.




            • Assignee:
              jsick Jonathan Sick
              swinbank John Swinbank
              John Swinbank
              John Swinbank, Jonathan Sick, Tim Jenness
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created:

                Summary Panel