# Hugo+PaperMod fails on GitHub Actions: can't evaluate field LanguageCode in type \*langs.Language

**URL:** <https://discourse.gohugo.io/t/hugo-papermod-fails-on-github-actions-cant-evaluate-field-languagecode-in-type-langs-language/48539>\
**Category:** support\
**Created:** [February 27, 2024, 8:39pm UTC](https://discourse.gohugo.io/t/hugo-papermod-fails-on-github-actions-cant-evaluate-field-languagecode-in-type-langs-language/48539 "2024-02-27T20:39:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pantelis\_Sopasakis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pantelis_sopasakis/32/21455_2.png) [@Pantelis\_Sopasakis](https://discourse.gohugo.io/u/Pantelis_Sopasakis)\
**Post date:** [February 27, 2024, 8:39pm UTC](https://discourse.gohugo.io/t/hugo-papermod-fails-on-github-actions-cant-evaluate-field-languagecode-in-type-langs-language/48539/1 "2024-02-27T20:39:51Z")

</div>

I have a website which is hosted on [GitHub](https://github.com/am-press/am-press.github.io/); I use hugo v0.83.0 and the PaperMod theme. Everything used to work without any issues until recently, but today I pushed some minor changes and got the following error message from GitHub actions:

```auto
  hugo \
    --gc --verbose \
    --baseURL https://am-press.github.io/
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    HUGO_VERSION: 0.83.0
    GITHUB_PAGES: true
INFO 2024/02/27 20:21:40 Using config file: 
Start building sites … 
INFO 2024/02/27 20:21:40 syncing static files to /home/runner/work/am-press.github.io/am-press.github.io/public/
ERROR 2024/02/27 20:21:40 render of "section" failed: "/home/runner/work/am-press.github.io/am-press.github.io/themes/hugo-PaperMod/layouts/_default/rss.xml:59:17": execute of template failed: template: _default/rss.xml:59:17: executing "_default/rss.xml" at <site>: can't evaluate field LanguageCode in type *langs.Language
ERROR 2024/02/27 20:21:40 render of "home" failed: "/home/runner/work/am-press.github.io/am-press.github.io/themes/hugo-PaperMod/layouts/_default/rss.xml:59:17": execute of template failed: template: _default/rss.xml:59:17: executing "_default/rss.xml" at <site>: can't evaluate field LanguageCode in type *langs.Language
Error: Error building site: failed to render pages: render of "section" failed: "/home/runner/work/am-press.github.io/am-press.github.io/themes/hugo-PaperMod/layouts/_default/rss.xml:59:17": execute of template failed: template: _default/rss.xml:59:17: executing "_default/rss.xml" at <site>: can't evaluate field LanguageCode in type *langs.Language
ERROR 2024/02/27 20:21:40 render of "section" failed: "/home/runner/work/am-press.github.io/am-press.github.io/themes/hugo-PaperMod/layouts/_default/rss.xml:59:17": execute of template failed: template: _default/rss.xml:59:17: executing "_default/rss.xml" at <site>: can't evaluate field LanguageCode in type *langs.Language
ERROR 2024/02/27 20:21:40 render of "section" failed: "/home/runner/work/am-press.github.io/am-press.github.io/themes/hugo-PaperMod/layouts/_default/rss.xml:59:17": execute of template failed: template: _default/rss.xml:59:17: executing "_default/rss.xml" at <site>: can't evaluate field LanguageCode in type *langs.Language
Total in 191 ms
Error: Process completed with exit code 255.

```

I have configured GitHub actions using [this YAML file](https://github.com/am-press/am-press.github.io/blob/main/.github/workflows/gh-pages.yml), that is,

```auto
name: Deploy Hugo PaperMod Demo to Pages

on:
  push:
    paths-ignore:
      - "images/**"
      - "LICENSE"
      - "README.md"
    branches:
      - main
  workflow_dispatch:
    # manual run
    inputs:
      hugoVersion:
        description: "Hugo Version"
        required: false
        default: "0.83.0"

# Allow one concurrent deployment
concurrency:
  group: "pages"
  cancel-in-progress: true

# Default to bash
defaults:
  run:
    shell: bash

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    env:
      HUGO_VERSION: "0.83.0"
    steps:
      - name: Check version
        if: ${{ github.event.inputs.hugoVersion }}
        run: export HUGO_VERSION="${{ github.event.inputs.hugoVersion }}"
      - name: Install Hugo CLI
        run: |
          wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb \
          && sudo dpkg -i ${{ runner.temp }}/hugo.deb
      - name: Checkout
        uses: actions/checkout@v3
        with:
          ref: main
      - name: Setup Pages
        id: pages
        uses: actions/configure-pages@v1
      - name: Get Theme
        run: git submodule update --init --recursive
      - name: Update theme to Latest commit
        run: git submodule update --remote --merge
      - name: Build with Hugo
        run: |
          hugo \
            --gc --verbose \
            --baseURL ${{ steps.pages.outputs.base_url }}
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: ./public
  # Deployment job
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1

```

I would appreciate any help with this.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 27, 2024, 8:48pm UTC](https://discourse.gohugo.io/t/hugo-papermod-fails-on-github-actions-cant-evaluate-field-languagecode-in-type-langs-language/48539/2 "2024-02-27T20:48:29Z")

</div>

You need to upgrade Hugo to a later version.

---

<div class="post-metadata">

**Author:** ![Pantelis\_Sopasakis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pantelis_sopasakis/32/21455_2.png) [@Pantelis\_Sopasakis](https://discourse.gohugo.io/u/Pantelis_Sopasakis)\
**Post date:** [February 27, 2024, 9:03pm UTC](https://discourse.gohugo.io/t/hugo-papermod-fails-on-github-actions-cant-evaluate-field-languagecode-in-type-langs-language/48539/3 "2024-02-27T21:03:53Z")

</div>

Thank you very much. This solved the issue. I used version 0.123.4 (I [https://github.com/gohugoio/hugo/releases/download/v0.123.4/hugo\_0.123.4\_linux-amd64.deb](https://github.com/gohugoio/hugo/releases/download/v0.123.4/hugo_0.123.4_linux-amd64.deb))

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [February 29, 2024, 9:04pm UTC](https://discourse.gohugo.io/t/hugo-papermod-fails-on-github-actions-cant-evaluate-field-languagecode-in-type-langs-language/48539/4 "2024-02-29T21:04:27Z")

</div>

Closed on February 29, 2024, 9:04pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
