synodriver / nonebot_plugin_picsearcher

pic search plugin for nonebot2
GNU General Public License v3.0
110 stars 16 forks source link

Connect call failed咋处理 #63

Open Octopus058 opened 6 months ago

Octopus058 commented 6 months ago

Traceback (most recent call last): File "D:\Python310\lib\site-packages\aiohttp\connector.py", line 986, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa File "D:\Python310\lib\asyncio\base_events.py", line 1076, in create_connection raise exceptions[0] File "D:\Python310\lib\asyncio\base_events.py", line 1060, in create_connection sock = await self._connect_sock( File "D:\Python310\lib\asyncio\base_events.py", line 969, in _connect_sock await self.sock_connect(sock, address) File "D:\Python310\lib\asyncio\selector_events.py", line 501, in sock_connect return await fut File "D:\Python310\lib\asyncio\selector_events.py", line 541, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 10061] Connect call failed ('127.0.0.1', 1080)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\Python310\lib\site-packages\nonebot_plugin_picsearcher__init.py", line 83, in get_setu async for msg in limiter(get_des(url, mod), getattr(bot.config, "search_limit", None) or 2): File "D:\Python310\lib\site-packages\nonebot_plugin_picsearcher\utils.py", line 9, in limiter yield await gen.asend(None) File "D:\Python310\lib\site-packages\nonebot_plugin_picsearcher__init__.py", line 51, in get_des async for msg in get_des_sau(url): File "D:\Python310\lib\site-packages\nonebot_plugin_picsearcher\saucenao.py", line 84, in get_des image_data: List[Tuple] = await get_pic_from_url(url) File "D:\Python310\lib\site-packages\nonebot_plugin_picsearcher\saucenao.py", line 77, in get_pic_from_url async with session.post("https://saucenao.com/search.php", data=data, headers=header, proxy=proxy) as res: File "D:\Python310\lib\site-packages\aiohttp\client.py", line 1138, in aenter__ self._resp = await self._coro File "D:\Python310\lib\site-packages\aiohttp\client.py", line 535, in _request conn = await self._connector.connect( File "D:\Python310\lib\site-packages\aiohttp\connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "D:\Python310\lib\site-packages\aiohttp\connector.py", line 905, in _createconnection , proto = await self._create_proxy_connection(req, traces, timeout) File "D:\Python310\lib\site-packages\aiohttp\connector.py", line 1231, in _create_proxy_connection transport, proto = await self._create_direct_connection( File "D:\Python310\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection raise last_exc File "D:\Python310\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "D:\Python310\lib\site-packages\aiohttp\connector.py", line 992, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientProxyConnectionError: Cannot connect to host 127.0.0.1:1080 ssl:default [Connect call failed ('127.0.0.1', 1080)] 这个报错咋处理呢

Octopus058 commented 6 months ago

我用的是nao

Octopus058 commented 6 months ago

MQ%2R2{EPS~E@X2)T89LSQB 看了其他issue,删除了proxy,也加了ssl=false