LmeSzinc / AzurLaneAutoScript

Azur Lane bot (CN/EN/JP/TW) 碧蓝航线脚本 | 无缝委托科研,全自动大世界
https://alas.azurlane.cloud
GNU General Public License v3.0
6.93k stars 832 forks source link

更新器报错,无法更新 #4357

Open kaipol opened 1 week ago

kaipol commented 1 week ago

在提问之前...

描述你的问题

点击更新器时报错,无法更新

如何复现

  1. 前往 '主页'
  2. 点击 '更新器'
  3. 滑动到 '....'
  4. 出现问题

预期行为

可以完成更新

相关 Logs

+-------------------------- Traceback (most recent call last) ---------------------------+
|                                                                                        |
| G:\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 0x000001C34BED34C8>    | |
| |        e = IndexError('list index out of range')                                   | |
| |    event = {                                                                       | |
| |                'event': 'callback',                                                | |
| |                'task_id': 'CB-click_callback-q35Ax25Han',                          | |
| |                'data': 0                                                           | |
| |            }                                                                       | |
| |     self = <pywebio.session.threadbased.ThreadBasedSession object at               | |
| |            0x000001C34BD84548>                                                     | |
| +------------------------------------------------------------------------------------+ |
| G:\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 0x000001C34BD84A88>>                                                  | |
| |           ]                                                                        | |
| |  values = ['']                                                                     | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| G:\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 0x000001C34BD84A88>,) |                |
| |   func = <function AlasGUI.dev_update at 0x000001C34BB90948>        |                |
| | kwargs = {}                                                         |                |
| |   self = <pywebio.output.use_scope_ object at 0x000001C34BB8E848>   |                |
| +---------------------------------------------------------------------+                |
|                                                                                        |
| G:\AzurLaneAutoScript\module\webui\app.py:874 in dev_update                            |
|                                                                                        |
|    873                                                                                 |
| >  874         update_table()                                                          |
|    875         self.task_handler.add(updater_switch.g(), delay=0.5, pending_delete=Tru |
|                                                                                        |
| +-------------------------------------- locals --------------------------------------+ |
| |           self = <module.webui.app.AlasGUI object at 0x000001C34BD84A88>           | |
| |              u = <function AlasGUI.dev_update.<locals>.u at 0x000001C34BED3D38>    | |
| |   update_table = <function AlasGUI.dev_update.<locals>.update_table at             | |
| |                  0x000001C34BED3CA8>                                               | |
| | updater_switch = <module.webui.utils.Switch object at 0x000001C34BF5B148>          | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| G:\AzurLaneAutoScript\module\webui\app.py:727 in update_table                          |
|                                                                                        |
|    726             with use_scope("updater_info", clear=True):                         |
| >  727                 local_commit = updater.get_commit(short_sha1=True)              |
|    728                 upstream_commit = updater.get_commit(                           |
|                                                                                        |
| G:\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 0x000001C34BB6F3C8> |           |
| | short_sha1 = True                                                        |           |
| +--------------------------------------------------------------------------+           |
|                                                                                        |
| G:\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 = '"G:/AzurLaneAutoScript/toolkit/Git/mingw64/bin/git.exe" log             | |
| |           --pretty=format:"%h'+32                                                  | |
| |    self = <module.webui.updater.Updater object at 0x000001C34BB6F3C8>              | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| G:\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 = (                                                                 | |
| |                      '"G:/AzurLaneAutoScript/toolkit/Git/mingw64/bin/git.exe" log  | |
| |                  --pretty=format:"%h'+32,                                          | |
| |                  )                                                                 | |
| |        process = <subprocess.Popen object at 0x000001C34BF52348>                   | |
| |        timeout = None                                                              | |
| +------------------------------------------------------------------------------------+ |
|                                                                                        |
| G:\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 0x000001C34BF52348> |                          |
| | timeout = None                                            |                          |
| +-----------------------------------------------------------+                          |
|                                                                                        |
| G:\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 0x000001C34BF52348>                     | |
| |       stderr = []                                                                  | |
| |       stdout = '1889ab1ac---LmeSzinc---2024-11-06 20:35:24 +0800---Merge pull      | |
| |                request #4356 from'+13                                              | |
| +------------------------------------------------------------------------------------+ |
+----------------------------------------------------------------------------------------+
IndexError: list index out of range

截图

image

还有别的吗?

No response

KamikoshiSorawo commented 5 days ago

没办法嘛这个😭