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

Wrong with client session #3

Open
TheSilentDawn opened this issue Mar 17, 2018 · 2 comments
Open

Wrong with client session #3

TheSilentDawn opened this issue Mar 17, 2018 · 2 comments

Comments

@TheSilentDawn
Copy link

Traceback (most recent call last):
File "/home/dcs/.local/bin/axeman", line 11, in
sys.exit(main())
File "/home/dcs/.local/lib/python3.5/site-packages/axeman/core.py", line 280, in main
loop.run_until_complete(get_certs_and_print())
File "uvloop/loop.pyx", line 1364, in uvloop.loop.Loop.run_until_complete
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/dcs/.local/lib/python3.5/site-packages/axeman/core.py", line 239, in get_certs_and_print
with aiohttp.ClientSession(conn_timeout=5) as session:
File "/home/dcs/.local/lib/python3.5/site-packages/aiohttp/client.py", line 745, in enter
raise TypeError("Use async with instead")
TypeError: Use async with instead
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7ff03a30fcf8>

@TheSilentDawn
Copy link
Author

core.py line 239 is wrong
with aiohttp.ClientSession(conn_timeout=5) as session:
should be
async with aiohttp.ClientSession(conn_timeout=5) as session:

@ganti
Copy link

ganti commented Nov 4, 2022

this is fixed, close

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