Home > other >  The crawler pool testing agency exception error: concurrent. Futures. _base. TimeoutError
The crawler pool testing agency exception error: concurrent. Futures. _base. TimeoutError

Time:11-18




Code to see the Cui Qingcai "python3 web crawler development of actual combat" ninth chapter agent used in the book, there are three modules a proxy, an API, and a is a testing agency is available, the problem is that the test, after running soon so unusual, but it is strange that this test will run and sort out can use agent, just quote is unusual, it's not clear what reason? How can I deal with this abnormal??????? Know the reason please let us know, thank you!!!!!
Exception code:
Agent pool running
Task exception was never retrieved
Future: & lt; The Task finished coro=& lt; Tester. Test_single_proxy () done, defined the at K: \ mycode \ proxy_demo \ SRC \ Tester py: 21 & gt; The exception=TimeoutError () & gt;
Traceback (the most recent call last) :
The File "K: \ mycode \ proxy_demo \ SRC \ tester py", line 36, in test_single_proxy
Async with session. Get (TEST_URL, proxy=real_proxy, timeout=15) as the response:
The File "D: \ \ Program Files \ Python37 \ lib \ site - packages \ aiohttp \ client py", line 1005, in __aenter__
Self. _resp=await self. _coro
The File "D: \ \ Program Files \ Python37 \ lib \ site - packages \ aiohttp \ client py", line 575, in _request
Break
The File "D: \ \ Program Files \ Python37 \ lib \ site - packages \ aiohttp \ helpers py", line 585, in __exit__
Raise asyncio. TimeoutError from None
Concurrent. Futures. _base. TimeoutError
The local environment is python3.7.2, virtual machine using redis database

CodePudding user response:

Hello, solved?
  • Related