Fix ImportError on CircleCI: add missing h2 dependency#24
Open
timerring wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CircleCI 运行 sakurafrp 签到时报 ImportError:
Root Cause
geetest_crack.py创建 httpx client 时用了http2=True,这需要h2包。CircleCI 的 pip install 列表里没有h2,httpx 初始化时 raise ImportError。本地能跑是因为
h2被其他依赖间接安装,但 CircleCI 的干净环境没有。Fix
requirements.txt:httpx→httpx[http2].circleci/config.yml:pip install ... httpx ...→pip install ... 'httpx[http2]' ...httpx[http2]会自动安装h2包。Co-Authored-By: Oz oz-agent@warp.dev