小编Jos*_*llo的帖子

__call__() 缺少 1 个必需的位置参数:在 App Engine 上“发送”FastAPI

尝试在 App Engine 上托管 API 时,不断出现以下错误。该程序曾经在 Flask 上运行,Flask 可以运行,但速度非常慢。

错误:

"Traceback (most recent call last):
  File "/env/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 134, in handle
    self.handle_request(listener, req, client, addr)
  File "/env/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 175, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
TypeError: __call__() missing 1 required positional argument: 'send'
"
Run Code Online (Sandbox Code Playgroud)

泊坞窗文件:

FROM gcr.io/google_appengine/python

RUN apt-get update && apt-get install -y ffmpeg

# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.

RUN virtualenv /env -p python3.7

# Setting these environment variables are …
Run Code Online (Sandbox Code Playgroud)

python google-app-engine gunicorn google-cloud-platform fastapi

29
推荐指数
3
解决办法
5万
查看次数