Closed NahidaBuer closed 2 years ago
虽然也看到别人有成功运行的例子,但是我真的没搞明白( 抽卡功能会报异常,无论是在群消息里还是频道里调用均会。 异常信息:(群)
11-23 19:20:56 [DEBUG] nonebot | CQHTTP | User is calling me 派蒙 11-23 19:20:56 [SUCCESS] nonebot | CQHTTP 3125556909 | [message.group.normal]: Message -307893237 from 530317214@[群:88888888] "相遇之缘" 11-23 19:20:56 [DEBUG] nonebot | Checking for matchers in priority 1... 11-23 19:20:56 [INFO] nonebot | Event will be handled by <Matcher from gacha, type=message, priority=1, temp=False> 11-23 19:20:56 [DEBUG] nonebot | Running matcher <Matcher from gacha, type=message, priority=1, temp=False> 11-23 19:20:56 [DEBUG] nonebot | Running handler <Handler _strip_cmd(bot: Bot, event: Event, state: typing.Dict[typing.Any, typing.Any], matcher: None)> 11-23 19:20:56 [DEBUG] nonebot | Running handler <Handler gacha_10_(bot: <class 'nonebot.adapters._bot.Bot'>, event: <class 'nonebot.adapters._event.Event'>, state: None, matcher: None)> 11-23 19:20:56 [INFO] nonebot | Matcher <Matcher from gacha, type=message, priority=1, temp=False> running complete 11-23 19:20:56 [ERROR] nonebot | Running matcher <Matcher from gacha, type=message, priority=1, temp=False> failed. Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "/usr/lib/python3.8/multiprocessing/spawn.py", line 129, in _main return self._bootstrap(parent_sentinel) File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.8/dist-packages/uvicorn/subprocess.py", line 76, in subprocess_started target(sockets=sockets) File "/usr/local/lib/python3.8/dist-packages/uvicorn/server.py", line 68, in run return asyncio.run(self.serve(sockets=sockets)) File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.8/dist-packages/nonebot/message.py", line 128, in _check_matcher await _run_matcher(Matcher, bot, event, state) > File "/usr/local/lib/python3.8/dist-packages/nonebot/message.py", line 156, in _run_matcher await matcher.run(bot, event, state) File "/usr/local/lib/python3.8/dist-packages/nonebot/matcher.py", line 597, in run await handler(self, bot, event, self.state) File "/usr/local/lib/python3.8/dist-packages/nonebot/handler.py", line 64, in __call__ await self.func( File "/root/GS_bot/Genshin_Impact_bot/gacha/__init__.py", line 51, in gacha_10_ await gacha_10.finish(Message(G.gacha_10()) , at_sender=True) File "/root/GS_bot/Genshin_Impact_bot/gacha/gacha.py", line 286, in gacha_10 new_gacha = self.gacha_one() File "/root/GS_bot/Genshin_Impact_bot/gacha/gacha.py", line 274, in gacha_one return random.choice(POOL[self.pool]['3_star_not_UP']) File "/usr/lib/python3.8/random.py", line 290, in choice raise IndexError('Cannot choose from an empty sequence') from None IndexError: Cannot choose from an empty sequence 11-23 19:20:56 [DEBUG] nonebot | Stop event propagation
这是米游社API的问题,抽卡已经修好了
虽然也看到别人有成功运行的例子,但是我真的没搞明白( 抽卡功能会报异常,无论是在群消息里还是频道里调用均会。 异常信息:(群)