Yuri-YuzuChaN / maimaiDX

基于HoshinoBot V2的舞萌DX查询插件,移植自mai-bot开源项目
MIT License
200 stars 32 forks source link

获取机厅信息时报错 #125

Closed YuYue-Amatsuki closed 1 year ago

YuYue-Amatsuki commented 1 year ago
[2023-10-09 00:08:33,097 maimaiDXArcade] INFO: 正在获取maimai所有机厅信息
2023-10-09 00:08:33 INFO 正在获取maimai所有机厅信息
[2023-10-09 00:08:34,363 maimaiDXArcade] ERROR: Error: Traceback (most recent call last):
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/libraries/maimaidx_arcade.py", line 151, in download_arcade_info
    arcade_dict['location'] = data[_dataid]['address']
IndexError: list index out of range

2023-10-09 00:08:34 ERROR Error: Traceback (most recent call last):
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/libraries/maimaidx_arcade.py", line 151, in download_arcade_info
    arcade_dict['location'] = data[_dataid]['address']
IndexError: list index out of range

[2023-10-09 00:08:34,364 maimaiDXArcade] ERROR: 获取机厅信息失败
2023-10-09 00:08:34 ERROR 获取机厅信息失败
2023-10-09 00:08:34 ERROR Exception
Traceback (most recent call last):
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/quart/app.py", line 1936, in startup
    await self.ensure_async(func)()
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/maimai_arcade.py", line 32, in _
    await arcade.getArcade()
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/libraries/maimaidx_arcade.py", line 130, in getArcade
    self.idList = [c_a.id for c_a in self.total]
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/libraries/maimaidx_arcade.py", line 130, in <listcomp>
    self.idList = [c_a.id for c_a in self.total]
AttributeError: 'dict' object has no attribute 'id'
Traceback (most recent call last):
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/quart/asgi.py", line 311, in __call__
    await self.app.startup()
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/quart/app.py", line 1936, in startup
    await self.ensure_async(func)()
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/maimai_arcade.py", line 32, in _
    await arcade.getArcade()
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/libraries/maimaidx_arcade.py", line 130, in getArcade
    self.idList = [c_a.id for c_a in self.total]
  File "/home/yuyue/HoshinoBot/hoshino/modules/maimaiDX/libraries/maimaidx_arcade.py", line 130, in <listcomp>
    self.idList = [c_a.id for c_a in self.total]
AttributeError: 'dict' object has no attribute 'id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "run.py", line 8, in <module>
    bot.run(use_reloader=False, loop=asyncio.get_event_loop())
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/nonebot/__init__.py", line 63, in run
    super().run(host=host, port=port, *args, **kwargs)
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/aiocqhttp/__init__.py", line 222, in run
    self._server_app.run(host=host, port=port, *args, **kwargs)
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/quart/app.py", line 1423, in run
    loop.run_until_complete(asyncio.gather(*tasks))
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/hypercorn/asyncio/__init__.py", line 49, in serve
    await worker_serve(
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/hypercorn/asyncio/run.py", line 81, in worker_serve
    raise exception
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/hypercorn/asyncio/lifespan.py", line 43, in handle_lifespan
    await self.app(
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/hypercorn/app_wrappers.py", line 33, in __call__
    await self.app(scope, receive, send)
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/quart/app.py", line 1902, in __call__
    await self.asgi_app(scope, receive, send)
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/quart/app.py", line 1928, in asgi_app
    await asgi_handler(receive, send)
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/quart/asgi.py", line 313, in __call__
    await send(
  File "/home/yuyue/.cache/pypoetry/virtualenvs/hoshinobot-YwPoqgTR-py3.8/lib/python3.8/site-packages/hypercorn/asyncio/lifespan.py", line 101, in asgi_send
    raise LifespanFailureError("startup", message["message"])
hypercorn.utils.LifespanFailureError: Lifespan failure in startup. ''dict' object has no attribute 'id''
Yuri-YuzuChaN commented 1 year ago

该问题已修复,请更新新版本