Reputation: 43
I'm trying to deploy a Quart based python app via Google Cloud's App Engine Standard. However, I keep getting the following error:
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'
I know that Quart is an ASGI solution and Google App Engine is a Serverless setting. One of the recommendations for deploying quart into AWS Lambda was to use Magnum. Does that work for Google Cloud App Engine as well?
Any help would be appreciated.
Upvotes: 4
Views: 1383
Reputation: 1872
Magnum is an adapter for using ASGI applications with AWS Lambda & API Gateway and is not tested for Google GCP.
I recommend following the suggestion of @di and use Uvicorn with Cloud Run.
Upvotes: 1
Reputation: 21520
From 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.
This also means that Quart will not be compatible with App Engine, Cloud Functions, etc.
However, it would work well with Cloud Run via a HTTP server that supports ASGI such as Uvicorn.
Upvotes: 1