Description
Describe the bug
A clear and concise description of what the bug is.
++++++++++++++++++++++++++++++++++++++++++++++++++++++
Task exception was never retrieved
future: <Task finished name='Task-360' coro=<Tester.test() done, defined at D:\work\python_code\ProxyPool-master\proxypool\processors\tester.py:34> exception=ClientResponseError(RequestInfo(url=URL('https://httpbin.org/ip'), method='GET', headers=<CIMultiDictProxy('Host': 'httpbin.org', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.11 aiohttp/3.9.1')>, real_url=URL('https://httpbin.org/ip')), (), status=400, message='Got more than 8190 bytes (12065) when reading Header value is too long.')>
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client_reqrep.py", line 965, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\streams.py", line 622, in read
await self._waiter
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client_proto.py", line 224, in data_received
messages, upgraded, tail = self._parser.feed_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "aiohttp\_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
File "aiohttp\_http_parser.pyx", line 732, in aiohttp._http_parser.cb_on_header_value
aiohttp.http_exceptions.LineTooLong: 400, message:
Got more than 8190 bytes (12065) when reading Header value is too long.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\work\python_code\ProxyPool-master\proxypool\processors\tester.py", line 50, in test
async with session.get(url, proxy=f'http://{proxy.string()}', timeout=TEST_TIMEOUT) as response:
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client.py", line 1187, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client.py", line 601, in _request
await resp.start(conn)
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client_reqrep.py", line 967, in start
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Got more than 8190 bytes (12065) when reading Header value is too long.', url=URL('https://httpbin.org/ip')
Process Process-1:
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\multiprocessing\process.py", line 108, in run
self._target(self._args, **self._kwargs)
File "D:\work\python_code\ProxyPool-master\proxypool\scheduler.py", line 34, in run_tester
tester.run()
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\loguru_logger.py", line 1220, in catch_wrapper
return function(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\work\python_code\ProxyPool-master\proxypool\processors\tester.py", line 86, in run
self.loop.run_until_complete(asyncio.wait(tasks))
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\asyncio\base_events.py", line 640, in run_until_complete
self.run_forever()
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\asyncio\base_events.py", line 607, in run_forever
self._run_once()
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\asyncio\base_events.py", line 1884, in _run_once
event_list = self._selector.select(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\asyncio\windows_events.py", line 444, in select
self._poll(timeout)
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\asyncio\windows_events.py", line 817, in _poll
status = _overlapped.GetQueuedCompletionStatus(self._iocp, ms)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
Task exception was never retrieved
future: <Task finished name='Task-187' coro=<Tester.test() done, defined at D:\work\python_code\ProxyPool-master\proxypool\processors\tester.py:34> exception=ContentTypeError(RequestInfo(url=URL('https://httpbin.org/ip'), method='GET', headers=<CIMultiDictProxy('Host': 'httpbin.org', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.11 aiohttp/3.9.1')>, real_url=URL('https://httpbin.org/ip')), (), message='Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8', headers=<CIMultiDictProxy('Accept-Ranges': 'bytes', 'Connection': 'keep-alive', 'Content-Disposition': 'Content-Disposition', 'Content-Type': 'text/html;charset=utf-8', 'Etag': '5facd2d0-264', 'Last-Modified': 'Thu, 12 Nov 2020 06:14:40 GMT', 'Loginip': '139.224.56.162', 'Pragma': 'private', 'Server': 'HP HTTP Server; HP ENVY 7640 series - E4W43A; Serial Number: TH73P4S0Q0063T; Built:Tue May 26, 2020 07:08:30AM {NSM2CN2022AR}', 'Set-Cookie': 'SESSID=da122263a2bd; sessionid=ff122263a2bf; webvpnLang=webvpnLang; webvpn=; webvpncontext=00000@SSLContext', 'WWW-Authenticate': 'Basic realm="Tomcat Manager Application"', 'X-Cache': 'MISS from Hello', 'X-Cache-Lookup': 'MISS from Hello:8080', 'X-Content-Powered-By': 'K2 v2.8.0 (by JoomlaWor', 'X-Content-Type-Options': 'nosniff', 'X-Drupal-Cache': 'xHIT', 'X-Drupal-Dynamic-Cache': 'MISS', 'X-Frame-Options': 'SAMEORIGIN', 'X-Generator': 'Drupal 8 (https://www.drupal.org)', 'X-Jenkins': '2.121.3', 'X-Jenkins-Session': 'f72d6619', 'X-Powered-By': 'PHP/5.6.40', 'X-Xss-Protection': '1; mode=block', 'Date': 'Wed, 03 Jan 2024 14:40:46 GMT', 'Content-Length': '33')>)>
Traceback (most recent call last):
File "D:\work\python_code\ProxyPool-master\proxypool\processors\tester.py", line 51, in test
resp_json = await response.json()
^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client_reqrep.py", line 1165, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8', url=URL('https://httpbin.org/ip')
Task exception was never retrieved
future: <Task finished name='Task-188' coro=<Tester.test() done, defined at D:\work\python_code\ProxyPool-master\proxypool\processors\tester.py:34> exception=ClientResponseError(RequestInfo(url=URL('https://httpbin.org/ip'), method='CONNECT', headers=<CIMultiDictProxy('Host': 'httpbin.org', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.11 aiohttp/3.9.1')>, real_url=URL('http://152.228.218.210:59561')), (), status=400, message="Expected HTTP/:\n\n bytearray(b'')\n ^")>
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client_reqrep.py", line 965, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\streams.py", line 622, in read
await self._waiter
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client_proto.py", line 224, in data_received
messages, upgraded, tail = self._parser.feed_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "aiohttp\_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
Expected HTTP/:
bytearray(b'')
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\work\python_code\ProxyPool-master\proxypool\processors\tester.py", line 50, in test
async with session.get(url, proxy=f'http://{proxy.string()}', timeout=TEST_TIMEOUT) as response:
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client.py", line 1187, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client.py", line 574, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\connector.py", line 909, in _create_connection
_, proto = await self._create_proxy_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\connector.py", line 1307, in _create_proxy_connection
resp = await proxy_resp.start(conn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ProgramData\Anaconda3\envs\env_proxy\Lib\site-packages\aiohttp\client_reqrep.py", line 967, in start
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message="Expected HTTP/:\n\n bytearray(b'')\n ^", url=URL('http://152.228.218.210:59561')
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
- OS: [e.g. macOS 10.15.2]
- Python [e.g. Python 3.6]
- Browser [e.g. Chrome 67 ]
Additional context
Add any other context about the problem here.