Search code examples
pythonipythontravis-ciautodoc

Travis fails to convert ipython notebook to html


I am having an issue with generating HTML from ipython notebook using Travis. Autodoc is failing with the following error.

building [html]: targets for 36 source files that are out of date
updating environment: [new config] 36 added, 0 changed, 0 removed
reading sources... [  2%] ACC_Analysis                                          
Notebook error:
PandocMissing in ACC_Analysis.ipynb:
Pandoc wasn't found.
Please check that pandoc is installed:
https://pandoc.org/installing.html
Makefile:20: recipe for target 'html' failed
make: *** [html] Error 2
The command "make html" exited with 2.
0.00s$ touch build/html/.nojekyll
The command "touch build/html/.nojekyll" exited with 0.

Here is the build log: https://travis-ci.com/github/jmscslgroup/strym/builds/183858071

The peculiar thing is, autodoc doesn't fail on my local machine when I tun make html.

I am not able to figure out what dependency I need to tell Travis to install. If anyone has experience with this kind of issue, please help me. Thanks.


Solution

  • I figured this out. I needed to add the following lines to .travis.yml file:

    before_install:
        - sudo apt-get -y install pandoc