aio-libs/aiohttp-demos

AttributeError: 'coroutine' object has no attribute '_set_loop'

ali-sefidmouy opened this issue · 4 comments

Hi!
I'm trying to run chat demo with python main.py command, and getting this is my traceback :

Traceback (most recent call last):
  File "main.py", line 40, in <module>
    main()
  File "main.py", line 36, in main
    web.run_app(app)
  File "C:\Program Files\Python36\lib\site-packages\aiohttp\web.py", line 54, in run_app
    loop.run_until_complete(runner.setup())
  File "C:\Program Files\Python36\lib\asyncio\base_events.py", line 467, in run_until_complete
    return future.result()
  File "C:\Program Files\Python36\lib\site-packages\aiohttp\web_runner.py", line 170, in setup
    self._server = await self._make_server()
  File "C:\Program Files\Python36\lib\site-packages\aiohttp\web_runner.py", line 262, in _make_server
    self._app._set_loop(loop)
AttributeError: 'coroutine' object has no attribute '_set_loop'
sys:1: RuntimeWarning: coroutine 'init_app' was never awaited

How can i fix this??

upgrade aiohttp I guess

Hi @smart-developerr
I wasn't able to reproduce your error with python 3.6.
aiohttp version I got after pip install -e . is 3.6.2 (since it is not pinned in requirements)

related #44

Reproducible with aiohttp==3.0. I also encounter different problems with aiohttp 3.1-3.5. Have bumped the setup.py file to require atleast 3.6.