Skip to content

Fix ImportError on CircleCI: add missing h2 dependency#24

Open
timerring wants to merge 1 commit into
mainfrom
fix-sakurafrp-h2-import
Open

Fix ImportError on CircleCI: add missing h2 dependency#24
timerring wants to merge 1 commit into
mainfrom
fix-sakurafrp-h2-import

Conversation

@timerring

Copy link
Copy Markdown
Owner

Problem

CircleCI 运行 sakurafrp 签到时报 ImportError:

SakuraFrp check-in failed unexpectedly (ImportError)

Root Cause

geetest_crack.py 创建 httpx client 时用了 http2=True,这需要 h2 包。CircleCI 的 pip install 列表里没有 h2,httpx 初始化时 raise ImportError。

本地能跑是因为 h2 被其他依赖间接安装,但 CircleCI 的干净环境没有。

Fix

  • requirements.txt: httpxhttpx[http2]
  • .circleci/config.yml: pip install ... httpx ...pip install ... 'httpx[http2]' ...

httpx[http2] 会自动安装 h2 包。


Co-Authored-By: Oz oz-agent@warp.dev

geetest_crack.py creates httpx.Client(http2=True) which requires
the 'h2' package. On CircleCI the h2 package was not installed,
causing ImportError at runtime.

- Added httpx[http2] to requirements.txt (replaces bare httpx)
- Updated CircleCI pip install to include httpx[http2]

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant