[Solved] No code output with pygments on travis

I recently switched my automated deployment from Wercker to Travis. I’ve now realised, that there is no code rendered in the output.

I’ve substituted the resulting index.html with one rendered on my Mac. Anyway, the resulting file looked like this one here, which I had rendered during my tests.

pygmentize -V answers with Pygments version 2.2.0, (c) 2006-2017 by Georg Brandl and I’ve seen no warning or error from hugo that seems to be related to this issue in the build log.

Would be happy for some hints how to get the cause of the underlying problem.

I stared at your build log and did not see “an issue”, so it would be good if you were a little bit more specific.

That’s exactly what I was doing :slight_smile:

In my original post I linked expected outcome and real outcome. Issue is that Hugo on travis don’t render the code parts whereas Hugo on MacOS does.

OK, sorry, I read your post a little too fast.

I have not used Pygments on Travis, but it works fine on CircleCI, Netlify etc. But I do remember having an issue with Pygments 2.2, which is why we have this:

We should look into the issue with 2.2 (could you create an issue on GitHub?) and try to not fail so silently.

Assumed that :slight_smile:

Will try to install 2.1.3 on travis and report then to GitHub if it works with 2.1.3.

I’m currently on an excursion. So, could be Monday until I get to it.

For reference: https://github.com/gohugoio/hugo/issues/3608

I’ve substituted the resulting index.html with [https://github.com/mgmart/SchnuddelHuddel/blob/gh-pages/creating-new-org-files-for-hugo/index.html#L357-L403](one rendered on my Mac).

Hi @mgmart,

Is your Pygments on your Mac also v2.2.0?

I just wanted to confirm whether it is an issue with Pygments 2.2.0 on all platforms, or just Pygments 2.2.0 with Travis CI?

I could not reproduce the “no code output” with the example at https://gohugo.io/extras/highlighting/ with Pygments 2.2.0 running on Debian (amd64). It ran just fine here, so either the example is too simple, or it the problem is Travis specific?

Many thanks!

@anthonyfok,

it’s 2.2.0 indeed on my Mac. Sorry for being imprecise. I was so happy to have got a solution that I never checked back.

Travis was using Ubuntu 12.04.5 LTS during my attempts.

As a side note: My initial attempt was by using packages. Which resulted in installation of pygments version 1.4. Hugo failed silently also with pygments 1.4.