Open zerobeyondlogic opened 2 years ago
如果暂时禁用proxy,
报错是timeout,看来无法直连
09-20 21:47:33 [ERROR] nonebot | Running matcher <Matcher from nonebot_plugin_picsearcher, type=message, priority=0, temp=True> failed.
Traceback (most recent call last):
File "/home/beyond/qqbot/bot/bot.py", line 37, in
File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/message.py", line 196, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/internal/matcher.py", line 672, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/internal/matcher.py", line 639, in simple_run await handler( File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/dependencies/init.py", line 92, in call return await self.call(values) File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot_plugin_picsearcher/init.py", line 83, in get_setu await bot.send(event=event, message=msg) File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/adapters/onebot/v11/bot.py", line 220, in send return await self.class.send_handler(self, event, message, kwargs) File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/adapters/onebot/v11/bot.py", line 175, in send return await bot.send_msg(params) File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/internal/adapter/bot.py", line 117, in call_api raise exception File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/internal/adapter/bot.py", line 94, in call_api result = await self.adapter._call_api(self, api, data) File "/home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/nonebot/adapters/onebot/v11/adapter.py", line 136, in _call_api raise NetworkError(f"WebSocket call api {api} timeout") from None nonebot.adapters.onebot.v11.exception.NetworkError:
似乎是上游aiohttp的锅
似乎是链接断开了 看看gocq的log
这个不用管,有时候就算不是http代理也会报错,这个不影响运行
09-20 21:38:41 [INFO] nonebot | Event will be handled by <Matcher from nonebot_plugin_picsearcher, type=message, priority=0, temp=True> /home/beyond/qqbot/qqbotpy/lib/python3.10/site-packages/aiohttp/connector.py:905: RuntimeWarning: An HTTPS request is being sent through an HTTPS proxy. This support for TLS in TLS is known to be disabled in the stdlib asyncio. This is why you'll probably see an error in the log below.
It is possible to enable it via monkeypatching under Python 3.7 or higher. For more details, see:
You can temporarily patch this as follows:
https://github.com/aio-libs/aiohttp/discussions/6044
_, proto = await self._create_proxy_connection(req, traces, timeout) RuntimeWarning: Enable tracemalloc to get the object allocation traceback
在提示中给出了一些“解决方案”,看起来要修改调用了aiohttp的某些语句,但不知具体如何应用。
我是用的代理是v2ray proxy设置为socks5://127.0.0.1:10808