RF-Tar-Railt / nonebot-plugin-arkgacha

Plugin for Arknights gacha, support multi platform
GNU Affero General Public License v3.0
15 stars 1 forks source link

Bug: 返回结果出现 IndexError: list index out of range #14

Closed enKl03B closed 4 months ago

enKl03B commented 4 months ago

操作系统

Windows

Python 版本

3.11.0

NoneBot 版本

2.3.0

适配器

v11

描述问题

发送抽卡请求后,后台返回错误提示IndexError: list index out of range
toolkit版本为0.7.4

复现步骤

如上

期望的结果

No response

截图或日志

Running AlconnaMatcher(type='', module=nonebot_plugin_arkgacha, lineno=59) failed. Traceback (most recent call last): File "", line 21, in File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot__init.py", line 335, in run get_driver().run(*args, **kwargs) File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in run uvicorn.run( File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\uvicorn\main.py", line 577, in run server.run() File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\uvicorn\server.py", line 65, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\asyncio\base_events.py", line 636, in run_until_complete self.run_forever() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\asyncio\base_events.py", line 603, in run_forever self._run_once() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\asyncio\base_events.py", line 1909, in _run_once handle._run() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher await _run_matcher(

File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot\message.py", line 428, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run await handler( File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot\dependencies__init.py", line 94, in call return await cast(Callable[..., Awaitable[R]], self.call)(**values) File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\nonebot_pluginarkgacha__init__.py", line 142, in data = gacha.gacha(user, _count) File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\arknights_toolkit\gacha\main.py", line 107, in gacha cache.append(self.generate_operator(ans)) File "E:\MCL\nonebot\nb04-bot\nb04-bot.venv\lib\site-packages\arknights_toolkit\gacha\main.py", line 151, in generate_operator return Operator(random.choice(card_list), 4) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\random.py", line 378, in choice return seq[self._randbelow(len(seq))] IndexError: list index out of range

RF-Tar-Railt commented 4 months ago

插件更新到0.8.0