尝试在 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