Skip to content

ModuleNotFoundError: No module named 'pip' on github/codeql-action/analyze #1425

@hstoebel

Description

@hstoebel

I'm trying to call github/codeql-action/analyze@v2 in my workflow. It ran fine 5 days ago. When I reran for the same commit today it failed

the failed job

  codeql:
    name: security-scan
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        language: [python]

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v2
        with:
          languages: ${{ matrix.language }}

      - name: Autobuild
        uses: github/codeql-action/autobuild@v2

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v2

output from the run

/opt/hostedtoolcache/CodeQL/0.0.0-20221123/x64/codeql/codeql version --format=terse
 2.11.4

  /home/runner/.cache/pypoetry/virtualenvs/my-project-SllqOPWN-py3.10/bin/python -c import os; import pip; print(os.path.dirname(os.path.dirname(pip.__file__)))
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named 'pip'
  Error: The process '/home/runner/.cache/pypoetry/virtualenvs/my-project-SllqOPWN-py3.10/bin/python' failed with exit code 1
  Error: The process '/home/runner/.cache/pypoetry/virtualenvs/my-project-SllqOPWN-py3.10/bin/python' failed with exit code 1
      at ExecState._setResult (/home/runner/work/_actions/github/codeql-action/v2/node_modules/@actions/exec/lib/toolrunner.js:592:25)
      at ExecState.CheckComplete (/home/runner/work/_actions/github/codeql-action/v2/node_modules/@actions/exec/lib/toolrunner.js:575:18)
      at ChildProcess.<anonymous> (/home/runner/work/_actions/github/codeql-action/v2/node_modules/@actions/exec/lib/toolrunner.js:469:27)
      at ChildProcess.emit (node:events:390:28)
      at maybeClose (node:internal/child_process:1064:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

Happy to submit any other relevant information if anything's missing. Any guidance is appreciated!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy