Skip to content

更新器报错 #5449

@TheodoreZh

Description

@TheodoreZh

在提问之前...

  • 我已经搜索了现有的 issues
  • 我在提问题之前至少花费了 5 分钟来思考和准备
  • 我已经阅读了 Wiki 中的 常见问题(FAQ)
  • 我正在使用最新版的 Alas

描述你的问题

在点击主页下的更新器时会报错

如何复现

  1. 点击主页
  2. 点击更新器
  3. 出现问题

预期行为

No response

相关 Logs

+-------------------------- Traceback (most recent call last) ---------------------------+
|                                                                                        |
| D:\AzurLaneAutoScript\toolkit\lib\site-packages\pywebio\session\threadbased.py:254 in  |
| run                                                                                    |
|                                                                                        |
|   253                 try:                                                             |
| > 254                     callback(event['data'])                                      |
|   255                 except Exception as e:                                           |
|                                                                                        |
| +-------------------------------------- locals --------------------------------------+ |
| | callback = <function put_buttons.<locals>.click_callback at 0x000001FDD53A7F78>    | |
| |        e = IndexError('list index out of range')                                   | |
| |    event = {                                                                       | |
| |                'event': 'callback',                                                | |
| |                'task_id': 'CB-click_callback-Jr05MJC28u',                          | |
| |                'data': 0                                                           | |
| |            }                                                                       | |
| |     self = <pywebio.session.threadbased.ThreadBasedSession object at               | |
| |            0x000001FDD4B97588>                                                     | |
| +------------------------------------------------------------------------------------+ |
| D:\AzurLaneAutoScript\toolkit\lib\site-packages\pywebio\output.py:801 in               |
| click_callback                                                                         |
|                                                                                        |
|    800         if isinstance(onclick, Sequence):                                       |
| >  801             return onclick[btn_idx]()                                           |
|    802         else:                                                                   |
|                                                                                        |
| +-------------------------------------- locals --------------------------------------+ |
| | btn_idx = 0                                                                        | |
| |    btns = [{'label': '更新器', 'value': 0, 'color': 'menu', 'disabled': False}]    | |
| | onclick = [                                                                        | |
| |               <bound method AlasGUI.dev_update of <module.webui.app.AlasGUI object | |
| |           at 0x000001FDD4BE2D48>>                                                  | |
| |           ]                                                                        | |
| |  values = ['']                                                                     | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| D:\AzurLaneAutoScript\toolkit\lib\site-packages\pywebio\output.py:1796 in wrapper      |
|                                                                                        |
|   1795             try:                                                                |
| > 1796                 return func(*args, **kwargs)                                    |
|   1797             finally:                                                            |
|                                                                                        |
| +------------------------------ locals -------------------------------+                |
| |   args = (<module.webui.app.AlasGUI object at 0x000001FDD4BE2D48>,) |                |
| |   func = <function AlasGUI.dev_update at 0x000001FDD4B58EE8>        |                |
| | kwargs = {}                                                         |                |
| |   self = <pywebio.output.use_scope_ object at 0x000001FDD4B49588>   |                |
| +---------------------------------------------------------------------+                |
|                                                                                        |
| D:\AzurLaneAutoScript\module\webui\app.py:927 in dev_update                            |
|                                                                                        |
|    926                                                                                 |
| >  927         update_table()                                                          |
|    928         self.task_handler.add(updater_switch.g(), delay=0.5, pending_delete=Tru |
|                                                                                        |
| +-------------------------------------- locals --------------------------------------+ |
| |           self = <module.webui.app.AlasGUI object at 0x000001FDD4BE2D48>           | |
| |              u = <function AlasGUI.dev_update.<locals>.u at 0x000001FDD53ADDC8>    | |
| |   update_table = <function AlasGUI.dev_update.<locals>.update_table at             | |
| |                  0x000001FDD53D3E58>                                               | |
| | updater_switch = <module.webui.utils.Switch object at 0x000001FDD528D788>          | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| D:\AzurLaneAutoScript\module\webui\app.py:780 in update_table                          |
|                                                                                        |
|    779             with use_scope("updater_info", clear=True):                         |
| >  780                 local_commit = updater.get_commit(short_sha1=True)              |
|    781                 upstream_commit = updater.get_commit(                           |
|                                                                                        |
| D:\AzurLaneAutoScript\module\webui\updater.py:55 in get_commit                         |
|                                                                                        |
|    54         log = self.execute_output(                                               |
| >  55             f'"{self.git}" log {revision} --pretty=format:"%{ph}---%an---%ad---% |
|       --date=iso -{n}'                                                                 |
|    56         )                                                                        |
|                                                                                        |
| +--------------------------------- locals ---------------------------------+           |
| |          n = 1                                                           |           |
| |         ph = 'h'                                                         |           |
| |   revision = ''                                                          |           |
| |       self = <module.webui.updater.Updater object at 0x000001FDD4B28208> |           |
| | short_sha1 = True                                                        |           |
| +--------------------------------------------------------------------------+           |
|                                                                                        |
| D:\AzurLaneAutoScript\module\webui\updater.py:43 in execute_output                     |
|                                                                                        |
|    42         log = subprocess.run(                                                    |
| >  43             command, capture_output=True, text=True, encoding="utf8", shell=True |
|    44         ).stdout                                                                 |
|                                                                                        |
| +-------------------------------------- locals --------------------------------------+ |
| | command = '"D:/AzurLaneAutoScript/toolkit/Git/mingw64/bin/git.exe" log             | |
| |           --pretty=format:"%h'+32                                                  | |
| |    self = <module.webui.updater.Updater object at 0x000001FDD4B28208>              | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| D:\AzurLaneAutoScript\toolkit\lib\subprocess.py:490 in run                             |
|                                                                                        |
|    489         try:                                                                    |
| >  490             stdout, stderr = process.communicate(input, timeout=timeout)        |
|    491         except TimeoutExpired as exc:                                           |
|                                                                                        |
| +-------------------------------------- locals --------------------------------------+ |
| | capture_output = True                                                              | |
| |          check = False                                                             | |
| |          input = None                                                              | |
| |         kwargs = {                                                                 | |
| |                      'text': True,                                                 | |
| |                      'encoding': 'utf8',                                           | |
| |                      'shell': True,                                                | |
| |                      'stdout': -1,                                                 | |
| |                      'stderr': -1                                                  | |
| |                  }                                                                 | |
| |      popenargs = (                                                                 | |
| |                      '"D:/AzurLaneAutoScript/toolkit/Git/mingw64/bin/git.exe" log  | |
| |                  --pretty=format:"%h'+32,                                          | |
| |                  )                                                                 | |
| |        process = <subprocess.Popen object at 0x000001FDD52A8D88>                   | |
| |        timeout = None                                                              | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| D:\AzurLaneAutoScript\toolkit\lib\subprocess.py:964 in communicate                     |
|                                                                                        |
|    963             try:                                                                |
| >  964                 stdout, stderr = self._communicate(input, endtime, timeout)     |
|    965             except KeyboardInterrupt:                                           |
|                                                                                        |
| +------------------------- locals --------------------------+                          |
| | endtime = None                                            |                          |
| |   input = None                                            |                          |
| |    self = <subprocess.Popen object at 0x000001FDD52A8D88> |                          |
| | timeout = None                                            |                          |
| +-----------------------------------------------------------+                          |
|                                                                                        |
| D:\AzurLaneAutoScript\toolkit\lib\subprocess.py:1319 in _communicate                   |
|                                                                                        |
|   1318             if stderr is not None:                                              |
| > 1319                 stderr = stderr[0]                                              |
|   1320                                                                                 |
|                                                                                        |
| +-------------------------------------- locals --------------------------------------+ |
| |      endtime = None                                                                | |
| |        input = None                                                                | |
| | orig_timeout = None                                                                | |
| |         self = <subprocess.Popen object at 0x000001FDD52A8D88>                     | |
| |       stderr = []                                                                  | |
| |       stdout = '12df3ef---LmeSzinc---2026-01-16 17:08:56 +0800---Merge pull        | |
| |                request #5445 from L'+11                                            | |
| +------------------------------------------------------------------------------------+ |
+----------------------------------------------------------------------------------------+
IndexError: list index out of range

截图

Image Image Image Image

还有别的吗?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions