When using AsyncApp and a route returns an async generator I get the error : AttributeError: 'coroutine' object has no attribute 'encode'
for example :
async def route():
async def gen():
while True:
yield json.dumps({'msg': 'Hello World!'}) + '\n\n'
await asyncio.sleep(0.5)
return StreamingResponse(gen())
When the generator is not async everything works fine.
When the generator is not async and using AsyncApp StreamingResponse is needed
but when using FlaskApp returning the generator directly works fine.