Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

SyntaxError while setting up Python dependencies

未關閉
#375 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
github-actions, python
領域
ci-cd

研究方向

從 python-setup/install_tools.sh 開始,特別檢查 issue 中提到的選用 Python 2 處理,並將其與失敗的 GitHub Actions 設定記錄進行比較。當相依性設定不再嘗試執行不相容的 Python 2 pip 安裝,且 workflow 在沒有此 SyntaxError 的情況下完成時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

Since a couple of days (?), I'm seeing this in my runs:

Setup Python dependencies
  /home/runner/work/_actions/github/codeql-action/v1/python-setup/install_tools.sh
[...]
  + 
  + curl --location --fail https://bootstrap.pypa.io/get-pip.py
  + command -v python2
  /usr/bin/python2
  + python2
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100 1883k  100 1883k    0     0  3327k      0 --:--:-- --:--:-- --:--:-- 3327k
  Traceback (most recent call last):
    File "<stdin>", line 24226, in <module>
    File "<stdin>", line 199, in main
    File "<stdin>", line 82, in bootstrap
    File "/tmp/tmpSl4FBD/pip.zip/pip/_internal/cli/main.py", line 60
      sys.stderr.write(f"ERROR: {exc}")
                                     ^
  SyntaxError: invalid syntax
Warning: Unable to download and extract the tools needed for installing the python dependencies. You can call this action with 'setup-python-dependencies: false' to disable this process.

This is probably due to pip dropping support for Python 2 recently.

Given that Python 2 support seems to be optional, maybe it'd be a good time to drop it, given that Python 2 has been declared end-of-life over a year ago?

主要語言
TypeScript
星號
1.6k
分支
493
平均合併
1 天 13 小時
30 天內合併 PR
44

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/codeql-action 的其他 Issue

查看 github/codeql-action 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。