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

Missing pandoc in Travis docs build

    Details

    • Templates:
    • Story Points:
      0.7
    • Team:
      SQuaRE

      Description

      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/2.0.1.1/pandoc-2.0.1.1-1-amd64.deb ...
      * Unpacking pandoc-2.0.1.1-1-amd64.deb 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
          extra_args=extra_args)
        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
          _ensure_pandoc_path()
        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>
          sys.exit(main())
        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
          extra_args=extra_args)
        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
          pypandoc.download_pandoc()
        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
          subprocess.check_call(cmd)
        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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel