2

Have problem with using quart server with telethon library, but cannot handle the error. Trying to turn debug mode on, but it says that Warning: The config debughas no affect when using serve warnings.warn("The configdebug has no affect when using serve", Warning)

Here is my code:

quart_cfg = hypercorn.Config()
quart_cfg.bind = ["0.0.0.0:8000"]
quart_cfg.debug = True
app = Quart(__name__)
...
async def main():
    await hypercorn.asyncio.serve(app,quart_cfg)
if __name__ == '__main__':
    client.loop.run_until_complete(main())

How can i see logs from quart server? Maybe i can use something else rather than serve function? Cannot find any docs either..

lorrod
  • 21
  • 3

1 Answers1

4

You can achieve the same affect as the debug flag by setting loop.set_debug(debug) as,

quart_cfg = hypercorn.Config()
quart_cfg.bind = ["0.0.0.0:8000"]
app = Quart(__name__)
...
async def main():
    await hypercorn.asyncio.serve(app,quart_cfg)

if __name__ == '__main__':
    client.loop.set_debug(True)
    client.loop.run_until_complete(main())
pgjones
  • 6,044
  • 1
  • 14
  • 12