Issue Description / 问题描述 docker-compose up 后 ToolServerNode-1报错
Please provide a detailed description of the error or issue you encountered. / 请详细描述您遇到的错误或问题。
ToolServerNode-1 | ERROR: Traceback (most recent call last):
ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
ToolServerNode-1 | async with self.lifespan_context(app) as maybe_state:
ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
ToolServerNode-1 | await self._router.startup()
ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 656, in startup
ToolServerNode-1 | handler()
ToolServerNode-1 | File "/app/main.py", line 32, in startup
ToolServerNode-1 | app.tool_register = ToolRegister()
ToolServerNode-1 | File "/app/core/register/register.py", line 54, in init
ToolServerNode-1 | self.check_and_register(attr)
ToolServerNode-1 | File "/app/core/register/register.py", line 80, in check_and_register
ToolServerNode-1 | env = attr(config=self.config.dict())
ToolServerNode-1 | File "/app/core/envs/web.py", line 25, in init
ToolServerNode-1 | self.client = httpx.AsyncClient(headers=self.headers,verify=False,timeout=30.0,http2=True)
ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1409, in init
ToolServerNode-1 | raise ImportError(
ToolServerNode-1 | ImportError: Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using pip install httpx[http2].
ToolServerNode-1 |
ToolServerNode-1 | ERROR: Application startup failed. Exiting.
ToolServerNode-1 exited with code 3
Steps to Reproduce / 复现步骤 docker-compose up 报错,之后按照提示,重新pip install httpx[http2]。
提示:Requirement already satisfied: httpx[http2] in d:\programs\python\python312\lib\site-packages (0.25.2)
之后再重新pip install -r requirements.txt,再docker-compose up,仍然提示h2 package没有安装
Please provide the specific steps to reproduce the error. / 请提供复现错误的具体步骤。
Expected Behavior / 预期行为
Describe the behavior you expected to see. / 请描述您期望的正确行为。
Environment / 环境信息
Operating System / 操作系统:WIN10 22H2 19045.3803
Python Version / Python 版本:Python 3.12.1
Other Relevant Information / 其他相关信息:Docker v4.26.1
Error Screenshots or Logs / 错误截图或日志
If possible, please provide relevant screenshots or logs of the error. / 如果可能,请提供相关的错误截图或日志文件。
Additional Notes / 其他备注
If you have any additional information or notes, please add them here. / 如果有其他补充信息,请在此处添加。
Issue Description / 问题描述 docker-compose up 后 ToolServerNode-1报错
Please provide a detailed description of the error or issue you encountered. / 请详细描述您遇到的错误或问题。 ToolServerNode-1 | ERROR: Traceback (most recent call last): ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan ToolServerNode-1 | async with self.lifespan_context(app) as maybe_state: ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter ToolServerNode-1 | await self._router.startup() ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 656, in startup ToolServerNode-1 | handler() ToolServerNode-1 | File "/app/main.py", line 32, in startup ToolServerNode-1 | app.tool_register = ToolRegister() ToolServerNode-1 | File "/app/core/register/register.py", line 54, in init ToolServerNode-1 | self.check_and_register(attr) ToolServerNode-1 | File "/app/core/register/register.py", line 80, in check_and_register ToolServerNode-1 | env = attr(config=self.config.dict()) ToolServerNode-1 | File "/app/core/envs/web.py", line 25, in init ToolServerNode-1 | self.client = httpx.AsyncClient(headers=self.headers,verify=False,timeout=30.0,http2=True) ToolServerNode-1 | File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1409, in init ToolServerNode-1 | raise ImportError( ToolServerNode-1 | ImportError: Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using
pip install httpx[http2]
. ToolServerNode-1 | ToolServerNode-1 | ERROR: Application startup failed. Exiting. ToolServerNode-1 exited with code 3Steps to Reproduce / 复现步骤 docker-compose up 报错,之后按照提示,重新pip install httpx[http2]。
提示:Requirement already satisfied: httpx[http2] in d:\programs\python\python312\lib\site-packages (0.25.2) 之后再重新pip install -r requirements.txt,再docker-compose up,仍然提示h2 package没有安装 Please provide the specific steps to reproduce the error. / 请提供复现错误的具体步骤。
Expected Behavior / 预期行为
Describe the behavior you expected to see. / 请描述您期望的正确行为。
Environment / 环境信息
Error Screenshots or Logs / 错误截图或日志
If possible, please provide relevant screenshots or logs of the error. / 如果可能,请提供相关的错误截图或日志文件。
Additional Notes / 其他备注
If you have any additional information or notes, please add them here. / 如果有其他补充信息,请在此处添加。