[GH-ISSUE #213] Can't use setup-python action #146

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

Originally created by @mrf345 on GitHub (Apr 28, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/213

Thanks for the awesome tool!

I'm running into issues while using actions/setup-python. I did test it with the recommended image nektos/act-environments-ubuntu:18.04.

My workflow:

name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-python
      with:
        python-version: '3.7'
    - name: Install dependencies
      run: pip install -r requirements/test.txt
    - name: Style check
      run: make lint
    - name: Run tests
      run: make test

Error log:

[CI/build] ⭐  Run actions/checkout@v2
[CI/build] Skipping actions/checkout
[CI/build]   ✅  Success - actions/checkout@v2
DEBU[0001] Loading slug from git directory '/home/mrf3/Projects/flask_production_ready/.git' 
DEBU[0001] Found revision: 62cf15d7db9a0dffaa7fb359ccc1d061f615042e 
DEBU[0001] Loading revision from git directory '/home/mrf3/Projects/flask_production_ready/.git' 
DEBU[0001] Found revision: 62cf15d7db9a0dffaa7fb359ccc1d061f615042e 
DEBU[0001] HEAD points to '62cf15d7db9a0dffaa7fb359ccc1d061f615042e' 
DEBU[0001] HEAD matches refs/heads/testing              
DEBU[0001] using github ref: refs/heads/testing         
[CI/build] ⭐  Run actions/setup-python
[CI/build]   ☁  git clone 'https://github.com/actions/setup-python' # ref=
[CI/build]   cloning https://github.com/actions/setup-python to /home/mrf3/.cache/act/actions-setup-python
[CI/build] Cloned https://github.com/actions/setup-python to /home/mrf3/.cache/act/actions-setup-python
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8a80d6]

goroutine 18 [running]:
gopkg.in/src-d/go-git%2ev4.(*Repository).ResolveRevision(0xc000402450, 0x0, 0x0, 0xc0002c4f00, 0x2, 0x2)
	/home/runner/work/act/act/vendor/gopkg.in/src-d/go-git.v4/repository.go:1441 +0x346
github.com/nektos/act/pkg/common.NewGitCloneExecutor.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0)
	/home/runner/work/act/act/pkg/common/git.go:245 +0x94b
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x1d, 0xb8a3c0)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xb, 0xc0001255f0)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/runner.(*RunContext).newStepExecutor.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0)
	/home/runner/work/act/act/pkg/runner/run_context.go:204 +0x36c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0xd)
	/home/runner/work/act/act/pkg/common/executor.go:146 +0x17c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xd, 0xc00035e7f0)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xc0003fcd48, 0xc00035e380)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xaa64d0, 0xc00036e230)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xdf5ee0, 0xc00035e7f0)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x1, 0x0)
	/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.If.func1(0xdea3e0, 0xc0003d9ec0, 0xc00035e760, 0x8)
	/home/runner/work/act/act/pkg/common/executor.go:154 +0x6a
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1(0xdea3e0, 0xc000368870, 0xc0003edc20, 0xc000064f70)
	/home/runner/work/act/act/pkg/runner/runner.go:74 +0x23a
github.com/nektos/act/pkg/common.Executor.ChannelError.func1(0xdea3e0, 0xc000368870, 0xc0003edc20, 0x0)
	/home/runner/work/act/act/pkg/common/executor.go:125 +0x45
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xc0003edbe0, 0xc00038e4e0, 0xdea3e0, 0xc000368870)
	/home/runner/work/act/act/pkg/common/executor.go:101 +0x56
created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1
	/home/runner/work/act/act/pkg/common/executor.go:100 +0xb7
Originally created by @mrf345 on GitHub (Apr 28, 2020). Original GitHub issue: https://github.com/nektos/act/issues/213 Thanks for the awesome tool! I'm running into issues while using `actions/setup-python`. I did test it with the recommended image `nektos/act-environments-ubuntu:18.04`. **My workflow**: ```yml name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-python with: python-version: '3.7' - name: Install dependencies run: pip install -r requirements/test.txt - name: Style check run: make lint - name: Run tests run: make test ``` **Error log**: ```log [CI/build] ⭐ Run actions/checkout@v2 [CI/build] Skipping actions/checkout [CI/build] ✅ Success - actions/checkout@v2 DEBU[0001] Loading slug from git directory '/home/mrf3/Projects/flask_production_ready/.git' DEBU[0001] Found revision: 62cf15d7db9a0dffaa7fb359ccc1d061f615042e DEBU[0001] Loading revision from git directory '/home/mrf3/Projects/flask_production_ready/.git' DEBU[0001] Found revision: 62cf15d7db9a0dffaa7fb359ccc1d061f615042e DEBU[0001] HEAD points to '62cf15d7db9a0dffaa7fb359ccc1d061f615042e' DEBU[0001] HEAD matches refs/heads/testing DEBU[0001] using github ref: refs/heads/testing [CI/build] ⭐ Run actions/setup-python [CI/build] ☁ git clone 'https://github.com/actions/setup-python' # ref= [CI/build] cloning https://github.com/actions/setup-python to /home/mrf3/.cache/act/actions-setup-python [CI/build] Cloned https://github.com/actions/setup-python to /home/mrf3/.cache/act/actions-setup-python panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8a80d6] goroutine 18 [running]: gopkg.in/src-d/go-git%2ev4.(*Repository).ResolveRevision(0xc000402450, 0x0, 0x0, 0xc0002c4f00, 0x2, 0x2) /home/runner/work/act/act/vendor/gopkg.in/src-d/go-git.v4/repository.go:1441 +0x346 github.com/nektos/act/pkg/common.NewGitCloneExecutor.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0) /home/runner/work/act/act/pkg/common/git.go:245 +0x94b github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x1d, 0xb8a3c0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xb, 0xc0001255f0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/runner.(*RunContext).newStepExecutor.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0) /home/runner/work/act/act/pkg/runner/run_context.go:204 +0x36c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0xd) /home/runner/work/act/act/pkg/common/executor.go:146 +0x17c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xd, 0xc00035e7f0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xc0003fcd48, 0xc00035e380) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xaa64d0, 0xc00036e230) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xdf5ee0, 0xc00035e7f0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x1, 0x0) /home/runner/work/act/act/pkg/common/executor.go:133 +0x4c github.com/nektos/act/pkg/common.Executor.If.func1(0xdea3e0, 0xc0003d9ec0, 0xc00035e760, 0x8) /home/runner/work/act/act/pkg/common/executor.go:154 +0x6a github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1(0xdea3e0, 0xc000368870, 0xc0003edc20, 0xc000064f70) /home/runner/work/act/act/pkg/runner/runner.go:74 +0x23a github.com/nektos/act/pkg/common.Executor.ChannelError.func1(0xdea3e0, 0xc000368870, 0xc0003edc20, 0x0) /home/runner/work/act/act/pkg/common/executor.go:125 +0x45 github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xc0003edbe0, 0xc00038e4e0, 0xdea3e0, 0xc000368870) /home/runner/work/act/act/pkg/common/executor.go:101 +0x56 created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1 /home/runner/work/act/act/pkg/common/executor.go:100 +0xb7 ```
kerem closed this issue 2026-03-01 21:40:38 +03:00
Author
Owner

@mrf345 commented on GitHub (Apr 29, 2020):

Never mind that. using actions/setup-python@v1 instead, did resolve it.

<!-- gh-comment-id:620915914 --> @mrf345 commented on GitHub (Apr 29, 2020): Never mind that. using `actions/setup-python@v1` instead, did resolve it.
Author
Owner

@pimterry commented on GitHub (Oct 21, 2020):

For others running into this and still having trouble with v1, I found this comment fixed it for me (using v2):

      - run: |
          # Hack to get setup-python to work on act
          if [ ! -f "/etc/lsb-release" ] ; then
            echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
          fi
<!-- gh-comment-id:713740640 --> @pimterry commented on GitHub (Oct 21, 2020): For others running into this and still having trouble with v1, I found [this comment](https://github.com/nektos/act/issues/251#issuecomment-706412948) fixed it for me (using v2): ```yml - run: | # Hack to get setup-python to work on act if [ ! -f "/etc/lsb-release" ] ; then echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release fi ```
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#146
No description provided.