Diving-Fish / mai-bot

Based on nonebot, a common bot framework for maimai.
MIT License
311 stars 90 forks source link

查b40的时候说证书过期 #32

Closed Rindred closed 1 year ago

Rindred commented 1 year ago

下面是具体的错误信息 02-07 18:19:38 [INFO] nonebot | Matcher <Matcher from src.plugins.maimaidx, type=message, priority=1, temp=False> running complete 02-07 18:19:38 [ERROR] nonebot | Running matcher <Matcher from src.plugins.maimaidx, type=message, priority=1, temp=False> failed. Traceback (most recent call last): File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\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 "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1081, in create_connection transport, protocol = await self._create_connection_transport( File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1111, in _create_connection_transport await waiter File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 528, in data_received ssldata, appdata = self._sslpipe.feed_ssldata(data) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py", line 188, in feed_ssldata self._sslobj.do_handshake() File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 944, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)

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

Traceback (most recent call last): File "C:\Users\Rindred\Desktop\code\mai-bot-main\bot.py", line 37, in nonebot.run() File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot__init__.py", line 261, in run get_driver().run(*args, *kwargs) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\drivers\fastapi.py", line 170, in run uvicorn.run( File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\main.py", line 576, in run server.run() File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\server.py", line 60, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete self.run_forever() File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 316, in run_forever super().run_forever() File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever self._run_once() File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1890, in _run_once handle._run() File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, self._args) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 146, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 196, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\matcher.py", line 672, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\matcher.py", line 639, in simplerun await handler( File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\dependencies__init.py", line 92, in call__ return await self.call(**values) File "C:\Users\Rindred\Desktop\code\mai-bot-main\src\plugins\maimaidx.py", line 278, in img, success = await generate(payload) File "C:\Users\Rindred\Desktop\code\mai-bot-main\src\libraries\maimai_best_40.py", line 390, in generate async with aiohttp.request("POST", "https://www.diving-fish.com/api/maimaidxprober/query/player", json=payload) as resp: File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1186, in aenter self._resp = await self._coro File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 535, in _request conn = await self._connector.connect( File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 907, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection raise last_exc File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "C:\Users\Rindred\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 988, in _wrap_create_connection raise ClientConnectorCertificateError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host www.diving-fish.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)')]