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

coroutine never awaited #15

Closed
xzy3 opened this issue Mar 20, 2018 · 2 comments
Closed

coroutine never awaited #15

xzy3 opened this issue Mar 20, 2018 · 2 comments

Comments

@xzy3
Copy link

xzy3 commented Mar 20, 2018

aiogremlin/driver/aiohttp/transport.py:22: RuntimeWarning: coroutine 'ClientWebSocketResponse.send_bytes' was never awaited
  self._ws.send_bytes(message)

I'm getting this warning while using goblin. It also seems that my db is not receiving the request. I added a return to that line and both problems went away.

aiogremlin 3.2.6
goblin 2.1.0

@davebshow
Copy link
Owner

It appears that send_bytes is now a coroutine (as of aiohttp 3.0), which means it should be awaited, not returned. We should probably use asyncio.iscoroutine to check now and await if necessary. Feel like doing a PR?

@xzy3
Copy link
Author

xzy3 commented Mar 20, 2018

done. I'm still learning the ropes of aio with python.

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

2 participants