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

AttributeError: 'NoneType' object has no attribute 'get_extra_info' with aiohttp==3.8.0 #29

Closed
john-parton opened this issue Nov 4, 2021 · 1 comment

Comments

@john-parton
Copy link

john-parton commented Nov 4, 2021

With the recently released aiohttp version 3.8.0, I get the following error:

AttributeError: 'NoneType' object has no attribute 'get_extra_info'

Here's a traceback:

Traceback (most recent call last):
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/web.py", line 433, in _run_app
    await runner.cleanup()
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/web_runner.py", line 294, in cleanup
    await self._cleanup_server()
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/web_runner.py", line 381, in _cleanup_server
    await self._app.cleanup()
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/web_app.py", line 432, in cleanup
    await self.on_cleanup.send(self)
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiosignal/__init__.py", line 36, in send
    await receiver(*args, **kwargs)  # type: ignore
  File "/home/john/Code/projects/proxywrench/proxywrench/app.py", line 127, in _stop_tester_loop
    await app["stop_testing"]()
  File "/home/john/Code/projects/proxywrench/proxywrench/hooks/__init__.py", line 56, in stop
    await _task
  File "/home/john/Code/projects/proxywrench/proxywrench/hooks/__init__.py", line 34, in inner
    await coro()
  File "/home/john/Code/projects/proxywrench/proxywrench/api/__init__.py", line 134, in test_proxies
    proxy = await check
  File "/home/john/.pyenv/versions/3.9.7/lib/python3.9/asyncio/tasks.py", line 614, in _wait_for_one
    return f.result()  # May raise f.exception().
  File "/home/john/Code/projects/proxywrench/proxywrench/api/__init__.py", line 29, in test_proxy
    test_result = await check_proxy(
  File "/home/john/Code/projects/proxywrench/proxywrench/network/check.py", line 46, in check_proxy
    async with session.get(
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/client.py", line 1140, in __aenter__
    self._resp = await self._coro
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/connector.py", line 543, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/connector.py", line 904, in _create_connection
    _, proto = await self._create_proxy_connection(req, traces, timeout)
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/connector.py", line 1324, in _create_proxy_connection
    return await self._start_tls_connection(
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/connector.py", line 1125, in _start_tls_connection
    tls_proto.connection_made(
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/base_protocol.py", line 58, in connection_made
    tcp_nodelay(tr, True)
  File "/home/john/.pyenv/versions/3.9.7/envs/proxywrench/lib/python3.9/site-packages/aiohttp/tcp_helpers.py", line 26, in tcp_nodelay
    sock = transport.get_extra_info("socket")
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

Code works fine with aiohttp==3.7.4.post0

EDIT

Okay, aiohttp-socks isn't even in the traceback here. I think it's just a plain issue with aiohttp 3.8

Apologies

@john-parton
Copy link
Author

I did some additional research and this does not appear to have anything to do with aiohttp-socks. Here's the issue I submitted to aiohttp for reference: aio-libs/aiohttp#6239

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