[GH-ISSUE #1853] Sphinx build failing on act but succeeding on actions #901

Closed
opened 2026-03-01 21:47:17 +03:00 by kerem · 2 comments
Owner

Originally created by @liopeer on GitHub (Jun 10, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1853

Bug report info

act version:            0.2.46
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
	$HOME/.docker/run/docker.sock
Config files:           
	/Users/lionelpeer/.actrc:
		-P ubuntu-latest=catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.20.4
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-ldflags:             -X main.version=0.2.46
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               arm64
		GOOS:                 darwin
Docker Engine:
	Engine version:        20.10.22
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         cgroupfs
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Docker Desktop
	OS type:               linux
	OS version:            
	OS arch:               aarch64
	OS kernel:             5.15.49-linuxkit
	OS CPU:                4
	OS memory:             7951 MB
	Security options:
		name=seccomp,profile=default
		name=cgroupns

Command used with act

act --container-architecture linux/amd64

Describe issue

Sphinx build fails at "make html" from the workflow below. It seems to be a timezone related issue that arises from the interaction of the Python packages babel & zoneinfo.

It is important to mention again, that it runs fine when pushing to Github, but unfortunately not in act.

Find the error below:

| Traceback (most recent call last):
| File "/usr/local/bin/sphinx-build", line 5, in
| from sphinx.cmd.build import main
| File "/usr/local/lib/python3.10/dist-packages/sphinx/cmd/build.py", line 20, in
| from sphinx.application import Sphinx
| File "/usr/local/lib/python3.10/dist-packages/sphinx/application.py", line 25, in
| from sphinx.config import Config
| File "/usr/local/lib/python3.10/dist-packages/sphinx/config.py", line 14, in
| from sphinx.util.i18n import format_date
| File "/usr/local/lib/python3.10/dist-packages/sphinx/util/i18n.py", line 12, in
| import babel.dates
| File "/usr/local/lib/python3.10/dist-packages/babel/dates.py", line 34, in
| from babel import localtime
| File "/usr/local/lib/python3.10/dist-packages/babel/localtime/init.py", line 41, in
| LOCALTZ = get_localzone()
| File "/usr/local/lib/python3.10/dist-packages/babel/localtime/init.py", line 37, in get_localzone
| return _get_localzone()
| File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_unix.py", line 49, in _get_localzone
| tzinfo = _get_tzinfo(zone_name)
| File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_helpers.py", line 21, in _get_tzinfo
| return zoneinfo.ZoneInfo(tzenv)
| File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 67, in find_tzfile
| _validate_tzfile_path(key)
| File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 81, in _validate_tzfile_path
| raise ValueError(
| ValueError: ZoneInfo keys may not be absolute paths, got: /UTC
| make: *** [Makefile:20: html] Error 1
[Push Docs Build/docs] Failure - Main Build docs
[Push Docs Build/docs] exitcode '2': failure
[Push Docs Build/docs] 🏁 Job failed

No response

Workflow content

name: "Push Docs Build"
on: [push]
permissions:
  contents: write

jobs:
  # anything in the job "docs" is executed on the same runner
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build docs
        run: |
          wget https://bootstrap.pypa.io/get-pip.py
          python get-pip.py
          cd $GITHUB_WORKSPACE/docs
          python -m pip install -r requirements.txt
          make html
      - uses: peaceiris/actions-gh-pages@v3
        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
        with:
          publish_branch: gh-pages
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docs/build/html/

Relevant log output

| Traceback (most recent call last):
|   File "/usr/local/bin/sphinx-build", line 5, in <module>
|     from sphinx.cmd.build import main
|   File "/usr/local/lib/python3.10/dist-packages/sphinx/cmd/build.py", line 20, in <module>
|     from sphinx.application import Sphinx
|   File "/usr/local/lib/python3.10/dist-packages/sphinx/application.py", line 25, in <module>
|     from sphinx.config import Config
|   File "/usr/local/lib/python3.10/dist-packages/sphinx/config.py", line 14, in <module>
|     from sphinx.util.i18n import format_date
|   File "/usr/local/lib/python3.10/dist-packages/sphinx/util/i18n.py", line 12, in <module>
|     import babel.dates
|   File "/usr/local/lib/python3.10/dist-packages/babel/dates.py", line 34, in <module>
|     from babel import localtime
|   File "/usr/local/lib/python3.10/dist-packages/babel/localtime/__init__.py", line 41, in <module>
|     LOCALTZ = get_localzone()
|   File "/usr/local/lib/python3.10/dist-packages/babel/localtime/__init__.py", line 37, in get_localzone
|     return _get_localzone()
|   File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_unix.py", line 49, in _get_localzone
|     tzinfo = _get_tzinfo(zone_name)
|   File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_helpers.py", line 21, in _get_tzinfo
|     return zoneinfo.ZoneInfo(tzenv)
|   File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 67, in find_tzfile
|     _validate_tzfile_path(key)
|   File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 81, in _validate_tzfile_path
|     raise ValueError(
| ValueError: ZoneInfo keys may not be absolute paths, got: /UTC
| make: *** [Makefile:20: html] Error 1

Additional information

No response

Originally created by @liopeer on GitHub (Jun 10, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1853 ### Bug report info ```plain text act version: 0.2.46 GOOS: darwin GOARCH: arm64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock $HOME/.docker/run/docker.sock Config files: /Users/lionelpeer/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.20.4 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.46 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: arm64 GOOS: darwin Docker Engine: Engine version: 20.10.22 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: aarch64 OS kernel: 5.15.49-linuxkit OS CPU: 4 OS memory: 7951 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act --container-architecture linux/amd64 ``` ### Describe issue Sphinx build fails at "make html" from the workflow below. It seems to be a timezone related issue that arises from the interaction of the Python packages babel & zoneinfo. It is important to mention again, that it runs fine when pushing to Github, but unfortunately not in act. Find the error below: | Traceback (most recent call last): | File "/usr/local/bin/sphinx-build", line 5, in <module> | from sphinx.cmd.build import main | File "/usr/local/lib/python3.10/dist-packages/sphinx/cmd/build.py", line 20, in <module> | from sphinx.application import Sphinx | File "/usr/local/lib/python3.10/dist-packages/sphinx/application.py", line 25, in <module> | from sphinx.config import Config | File "/usr/local/lib/python3.10/dist-packages/sphinx/config.py", line 14, in <module> | from sphinx.util.i18n import format_date | File "/usr/local/lib/python3.10/dist-packages/sphinx/util/i18n.py", line 12, in <module> | import babel.dates | File "/usr/local/lib/python3.10/dist-packages/babel/dates.py", line 34, in <module> | from babel import localtime | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/__init__.py", line 41, in <module> | LOCALTZ = get_localzone() | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/__init__.py", line 37, in get_localzone | return _get_localzone() | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_unix.py", line 49, in _get_localzone | tzinfo = _get_tzinfo(zone_name) | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_helpers.py", line 21, in _get_tzinfo | return zoneinfo.ZoneInfo(tzenv) | File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 67, in find_tzfile | _validate_tzfile_path(key) | File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 81, in _validate_tzfile_path | raise ValueError( | ValueError: ZoneInfo keys may not be absolute paths, got: /UTC | make: *** [Makefile:20: html] Error 1 [Push Docs Build/docs] ❌ Failure - Main Build docs [Push Docs Build/docs] exitcode '2': failure [Push Docs Build/docs] 🏁 Job failed ### Link to GitHub repository _No response_ ### Workflow content ```yml name: "Push Docs Build" on: [push] permissions: contents: write jobs: # anything in the job "docs" is executed on the same runner docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Build docs run: | wget https://bootstrap.pypa.io/get-pip.py python get-pip.py cd $GITHUB_WORKSPACE/docs python -m pip install -r requirements.txt make html - uses: peaceiris/actions-gh-pages@v3 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html/ ``` ### Relevant log output ```sh | Traceback (most recent call last): | File "/usr/local/bin/sphinx-build", line 5, in <module> | from sphinx.cmd.build import main | File "/usr/local/lib/python3.10/dist-packages/sphinx/cmd/build.py", line 20, in <module> | from sphinx.application import Sphinx | File "/usr/local/lib/python3.10/dist-packages/sphinx/application.py", line 25, in <module> | from sphinx.config import Config | File "/usr/local/lib/python3.10/dist-packages/sphinx/config.py", line 14, in <module> | from sphinx.util.i18n import format_date | File "/usr/local/lib/python3.10/dist-packages/sphinx/util/i18n.py", line 12, in <module> | import babel.dates | File "/usr/local/lib/python3.10/dist-packages/babel/dates.py", line 34, in <module> | from babel import localtime | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/__init__.py", line 41, in <module> | LOCALTZ = get_localzone() | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/__init__.py", line 37, in get_localzone | return _get_localzone() | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_unix.py", line 49, in _get_localzone | tzinfo = _get_tzinfo(zone_name) | File "/usr/local/lib/python3.10/dist-packages/babel/localtime/_helpers.py", line 21, in _get_tzinfo | return zoneinfo.ZoneInfo(tzenv) | File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 67, in find_tzfile | _validate_tzfile_path(key) | File "/usr/lib/python3.10/zoneinfo/_tzpath.py", line 81, in _validate_tzfile_path | raise ValueError( | ValueError: ZoneInfo keys may not be absolute paths, got: /UTC | make: *** [Makefile:20: html] Error 1 ``` ### Additional information _No response_
kerem 2026-03-01 21:47:17 +03:00
Author
Owner

@peytondmurray commented on GitHub (Jul 5, 2023):

@liopeer I ran into this issue today. There's definitely a problem with how the timezone is being retrieved by babel, but you can get around it by setting TZ=UTC to short circuit the problem during the sphinx build:

name: "Push Docs Build"
on: [push]
permissions:
  contents: write

jobs:
  # anything in the job "docs" is executed on the same runner
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build docs
        run: |
          wget https://bootstrap.pypa.io/get-pip.py
          python get-pip.py
          cd $GITHUB_WORKSPACE/docs
          python -m pip install -r requirements.txt
          TZ=UTC make html
      - uses: peaceiris/actions-gh-pages@v3
        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
        with:
          publish_branch: gh-pages
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docs/build/html/
<!-- gh-comment-id:1620853901 --> @peytondmurray commented on GitHub (Jul 5, 2023): @liopeer I ran into this issue today. There's definitely a problem with how the timezone is being retrieved by `babel`, but you can get around it by setting `TZ=UTC` to [short circuit](https://github.com/python-babel/babel/blob/1747d2230a0294a07c99563cf50fb95a37b6ac0f/babel/localtime/_unix.py#L34) the problem during the sphinx build: ```yml name: "Push Docs Build" on: [push] permissions: contents: write jobs: # anything in the job "docs" is executed on the same runner docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Build docs run: | wget https://bootstrap.pypa.io/get-pip.py python get-pip.py cd $GITHUB_WORKSPACE/docs python -m pip install -r requirements.txt TZ=UTC make html - uses: peaceiris/actions-gh-pages@v3 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html/ ```
Author
Owner

@github-actions[bot] commented on GitHub (Jan 2, 2024):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1873536870 --> @github-actions[bot] commented on GitHub (Jan 2, 2024): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#901
No description provided.