我正在尝试通过 Google Cloud 的 App Engine 标准部署基于 Quart 的 Python 应用程序。但是,我不断收到以下错误:
Traceback (most recent call last):
File "/env/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 284, in handle
keepalive = self.handle_request(req, conn)
File "/env/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 333, in handle_request
respiter = self.wsgi(environ, resp.start_response)
TypeError: __call__() missing 1 required positional argument: 'send'
我知道 Quart 是一个 ASGI 解决方案,而 Google App Engine 是一个无服务器设置。将 quart 部署到 AWS Lambda 的建议之一是使用 Magnum。这也适用于 Google Cloud App Engine 吗?
如有任何帮助,我们将不胜感激。
最佳答案
来自https://github.com/pgjones/quart/issues/68 :
Quart is an ASGI framework, rather than a WSGI framework, which means that it cannot work with serverless. It can work with Mangum, which is an ASGI alternative to serverless.
这也意味着 Quart 将不兼容 App Engine、Cloud Functions 等。
关于python - 在 Google App Engine 中部署 Quart Python 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59276760/