Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in example (examples/fake_server.py) #4283

Closed
prostomarkeloff opened this issue Oct 28, 2019 · 1 comment
Closed

Error in example (examples/fake_server.py) #4283

prostomarkeloff opened this issue Oct 28, 2019 · 1 comment

Comments

@prostomarkeloff
Copy link
Contributor

prostomarkeloff commented Oct 28, 2019

Long story short

I tried test a example in examples folder, and ... got error :(

Expected behaviour

Server should work normally.

Actual behaviour

Traceback (most recent call last):
  File "examples/fake_server.py", line 116, in <module>
    loop.run_until_complete(main(loop))
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "examples/fake_server.py", line 98, in main
    fake_facebook = FakeFacebook()
TypeError: __init__() missing 1 required keyword-only argument: 'loop'

After add loop argument, i got this warning:

{'name': 'John Doe', 'id': '12345678901234567'}
/home/markeloffdev/projects/python/aiohttp/aiohttp/client.py:1037: RuntimeWarning: coroutine 'noop' was never awaited
  self._resp.release()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
{'data': [{'name': 'Bill Doe', 'id': '233242342342'}, {'name': 'Mary Doe', 'id': '2342342343222'}, {'name': 'Alex Smith', 'id': '234234234344'}], 'paging': {'cursors': {'before': 'QVFIUjRtc2c5NEl0ajN', 'after': 'QVFIUlpFQWM0TmVuaDRad0dt'}, 'next': 'https://graph.facebook.com/v2.7/12345678901234567/friends?access_token=EAACEdEose0cB'}, 'summary': {'total_count': 3}}
Task was destroyed but it is pending!
task: <Task pending coro=<RequestHandler.start() running at /home/markeloffdev/projects/python/aiohttp/aiohttp/web_protocol.py:461> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fd830c3a5b8>()]>>

Steps to reproduce

Try run examples/fake_server.py.

Your environment

aiohttp: 4.0.0a1
OS: Ubuntu 18.04
Python: 3.7.3

This was referenced Oct 28, 2019
@prostomarkeloff
Copy link
Contributor Author

Fixed in #4284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant