AzurLaneAutoScript icon indicating copy to clipboard operation
AzurLaneAutoScript copied to clipboard

自动移动的敌人遇到了第二队,第一队将该敌人作为下一个目标时产生walk_out_of_step

Open Harry2020rookie opened this issue 3 years ago • 0 comments

在提问之前...

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

描述你的问题

道中队在上一场战斗结束后,自动移动的敌人遇到了我的boss队,而这个敌人是道中队下一个目标,此时点击敌人只会从道中队切换到boss队,需要再点一下敌人才会进入战斗,因此产生了 MapWalkError: walk_out_of_step

如何复现

  1. 前往 '...'
  2. 点击 '....'
  3. 滑动到 '....'
  4. 出现问题

预期行为

No response

相关 Logs

During handling of the above exception, another exception occurred:                                                    
                                                                                                                       
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│                                                                                                                     │
│ D:\AzurLaneAutoScript\alas.py:51 in run                                                                             │
│                                                                                                                     │
│    48 │   def run(self, command):                                                                                   │
│    49 │   │   try:                                                                                                  │
│    50 │   │   │   self.device.screenshot()                                                                          │
│ >  51 │   │   │   self.__getattribute__(command)()                                                                  │
│    52 │   │   │   return True                                                                                       │
│    53 │   │   except TaskEnd:                                                                                       │
│    54 │   │   │   return True                                                                                       │
│                                                                                                                     │
│ ┌───────────────────────────── locals ─────────────────────────────┐                                                │
│ │ command = 'war_archives'                                         │                                                │
│ │       e = MapWalkError('walk_out_of_step')                       │                                                │
│ │    self = <alas.AzurLaneAutoScript object at 0x000001FD97E7A8C8> │                                                │
│ └──────────────────────────────────────────────────────────────────┘                                                │
│ D:\AzurLaneAutoScript\alas.py:222 in war_archives                                                                   │
│                                                                                                                     │
│   219 │   def war_archives(self):                                                                                   │
│   220 │   │   from module.war_archives.war_archives import CampaignWarArchives                                      │
│   221 │   │   CampaignWarArchives(config=self.config, device=self.device).run(                                      │
│ > 222 │   │   │   name=self.config.Campaign_Name, folder=self.config.Campaign_Event,                                │
│       mode=self.config.Campaign_Mode)                                                                               │
│   223 │                                                                                                             │
│   224 │   def raid_daily(self):                                                                                     │
│   225 │   │   from module.raid.daily import RaidDaily                                                               │
│                                                                                                                     │
│ ┌─────────────────────────────────────── locals ───────────────────────────────────────┐                            │
│ │ CampaignWarArchives = <class 'module.war_archives.war_archives.CampaignWarArchives'> │                            │
│ │                self = <alas.AzurLaneAutoScript object at 0x000001FD97E7A8C8>         │                            │
│ └──────────────────────────────────────────────────────────────────────────────────────┘                            │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\war_archives\war_archives.py:35 in run                                                 │
│                                                                                                                     │
│   32 │                                                                                                              │
│   33 │   def run(self, name=None, folder='campaign_main', mode='normal', total=0):                                  │
│   34 │   │   backup = self.config.temporary(USE_DATA_KEY=True)                                                      │
│ > 35 │   │   super().run(name, folder, mode, total)                                                                 │
│   36 │   │   backup.recover()                                                                                       │
│   37 │   │   self.ui_goto_main()  # Go to main, as remaining in page can throw off Event task                       │
│   38                                                                                                                │
│                                                                                                                     │
│ ┌──────────────────────────────────────────── locals ─────────────────────────────────────────────┐                 │
│ │ __class__ = <class 'module.war_archives.war_archives.CampaignWarArchives'>                      │                 │
│ │    backup = <module.config.config.ConfigBackup object at 0x000001FDBC3F1308>                    │                 │
│ │    folder = 'war_archives_20210624_cn'                                                          │                 │
│ │      mode = 'normal'                                                                            │                 │
│ │      name = 'A2'                                                                                │                 │
│ │      self = <module.war_archives.war_archives.CampaignWarArchives object at 0x000001FDBC952B08> │                 │
│ │     total = 0                                                                                   │                 │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────┘                 │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\campaign\run.py:251 in run                                                             │
│                                                                                                                     │
│   248 │   │   │                                                                                                     │
│   249 │   │   │   # Run                                                                                             │
│   250 │   │   │   try:                                                                                              │
│ > 251 │   │   │   │   self.campaign.run()                                                                           │
│   252 │   │   │   except ScriptEnd as e:                                                                            │
│   253 │   │   │   │   logger.hr('Script end')                                                                       │
│   254 │   │   │   │   logger.info(str(e))                                                                           │
│                                                                                                                     │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐                    │
│ │ folder = 'war_archives_20210624_cn'                                                          │                    │
│ │   mode = 'normal'                                                                            │                    │
│ │   name = 'a2'                                                                                │                    │
│ │   self = <module.war_archives.war_archives.CampaignWarArchives object at 0x000001FDBC952B08> │                    │
│ │  total = 0                                                                                   │                    │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘                    │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\campaign\campaign_base.py:141 in run                                                   │
│                                                                                                                     │
│   138 │   │   for _ in range(20):                                                                                   │
│   139 │   │   │   try:                                                                                              │
│   140 │   │   │   │   if not self.map_is_auto_search:                                                               │
│ > 141 │   │   │   │   │   self.execute_a_battle()                                                                   │
│   142 │   │   │   │   else:                                                                                         │
│   143 │   │   │   │   │   self.auto_search_execute_a_battle()                                                       │
│   144 │   │   │   except CampaignEnd:                                                                               │
│                                                                                                                     │
│ ┌────────────────────────────────────── locals ───────────────────────────────────────┐                             │
│ │    _ = 3                                                                            │                             │
│ │ self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │                             │
│ └─────────────────────────────────────────────────────────────────────────────────────┘                             │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\campaign\campaign_base.py:100 in execute_a_battle                                      │
│                                                                                                                     │
│    97 │   │   result = False                                                                                        │
│    98 │   │   for _ in range(10):                                                                                   │
│    99 │   │   │   try:                                                                                              │
│ > 100 │   │   │   │   result = self.battle_function()                                                               │
│   101 │   │   │   │   break                                                                                         │
│   102 │   │   │   except MapEnemyMoved:                                                                             │
│   103 │   │   │   │   if self.battle_count > prev:                                                                  │
│                                                                                                                     │
│ ┌─────────────────────────────────────── locals ────────────────────────────────────────┐                           │
│ │      _ = 0                                                                            │                           │
│ │   prev = 3                                                                            │                           │
│ │ result = False                                                                        │                           │
│ │   self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │                           │
│ └───────────────────────────────────────────────────────────────────────────────────────┘                           │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\base\decorator.py:67 in wrapper                                                        │
│                                                                                                                     │
│    64 │   │   │   │   │   if not all(flag):                                                                         │
│    65 │   │   │   │   │   │   continue                                                                              │
│    66 │   │   │   │   │                                                                                             │
│ >  67 │   │   │   │   │   return record['func'](self, *args, **kwargs)                                              │
│    68 │   │   │   │                                                                                                 │
│    69 │   │   │   │   logger.warning(f'No option fits for {name}, using the last define                             │
│       func.')                                                                                                       │
│    70 │   │   │   │   return func(self, *args, **kwargs)                                                            │
│                                                                                                                     │
│ ┌─────────────────────────────────────── locals ────────────────────────────────────────┐                           │
│ │   args = ()                                                                           │                           │
│ │    cls = <class 'module.base.decorator.Config'>                                       │                           │
│ │   flag = [True, True]                                                                 │                           │
│ │   func = <function CampaignBase.battle_function at 0x000001FDBC565438>                │                           │
│ │ kwargs = {}                                                                           │                           │
│ │ logger = <Logger alas (INFO)>                                                         │                           │
│ │   name = 'battle_function'                                                            │                           │
│ │ record = {                                                                            │                           │
│ │          │   'options': {'MAP_CLEAR_ALL_THIS_TIME': False, 'POOR_MAP_DATA': False},   │                           │
│ │          │   'func': <function CampaignBase.battle_function at 0x000001FDBC565438>    │                           │
│ │          }                                                                            │                           │
│ │   self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │                           │
│ └───────────────────────────────────────────────────────────────────────────────────────┘                           │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\campaign\campaign_base.py:90 in battle_function                                        │
│                                                                                                                     │
│    87 │   │   logger.info(f'Using function: {func}')                                                                │
│    88 │   │   func = self.__getattribute__(func)                                                                    │
│    89 │   │                                                                                                         │
│ >  90 │   │   result = func()                                                                                       │
│    91 │   │                                                                                                         │
│    92 │   │   return result                                                                                         │
│    93                                                                                                               │
│                                                                                                                     │
│ ┌──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────┐ │
│ │ extra_battle = 3                                                                                                │ │
│ │         func = <bound method Campaign.battle_0 of <campaign.war_archives_20210624_cn.a2.Campaign object at      │ │
│ │                0x000001FDBC5BB988>>                                                                             │ │
│ │         self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988>                     │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\campaign\war_archives_20210624_cn\a2.py:69 in battle_0                                        │
│                                                                                                                     │
│   66 │   def battle_0(self):                                                                                        │
│   67 │   │   if self.clear_siren():                                                                                 │
│   68 │   │   │   return True                                                                                        │
│ > 69 │   │   if self.clear_enemy(scale=(1,)):                                                                       │
│   70 │   │   │   return True                                                                                        │
│   71 │   │   if self.clear_enemy(scale=(2,), genre=['light', 'main', 'enemy']):                                     │
│   72 │   │   │   return True                                                                                        │
│                                                                                                                     │
│ ┌────────────────────────────────────── locals ───────────────────────────────────────┐                             │
│ │ self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │                             │
│ └─────────────────────────────────────────────────────────────────────────────────────┘                             │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\map\map.py:206 in clear_enemy                                                          │
│                                                                                                                     │
│   203 │   │   if grids:                                                                                             │
│   204 │   │   │   logger.hr('Clear enemy')                                                                          │
│   205 │   │   │   self.show_select_grids(grids, **kwargs)                                                           │
│ > 206 │   │   │   self.clear_chosen_enemy(grids[0])                                                                 │
│   207 │   │   │   return True                                                                                       │
│   208 │   │                                                                                                         │
│   209 │   │   return False                                                                                          │
│                                                                                                                     │
│ ┌─────────────────────────────────────── locals ────────────────────────────────────────┐                           │
│ │  grids = <module.map.map_grids.SelectedGrids object at 0x000001FD99635548>            │                           │
│ │ kwargs = {'scale': (1,)}                                                              │                           │
│ │   self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │                           │
│ │ target = 'default_mode'                                                               │                           │
│ └───────────────────────────────────────────────────────────────────────────────────────┘                           │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\map\map.py:27 in clear_chosen_enemy                                                    │
│                                                                                                                     │
│    24 │   │   self.show_fleet()                                                                                     │
│    25 │   │   if self.config.Emotion_CalculateEmotion and self.config.Campaign_UseFleetLock:                        │
│    26 │   │   │   self.emotion.wait(fleet_index=self.fleet_current_index)                                           │
│ >  27 │   │   self.goto(grid, expected=expected)                                                                    │
│    28 │   │                                                                                                         │
│    29 │   │   self.full_scan()                                                                                      │
│    30 │   │   self.find_path_initial()                                                                              │
│                                                                                                                     │
│ ┌──────────────────────────────────────── locals ─────────────────────────────────────────┐                         │
│ │ expected = 'combat'                                                                     │                         │
│ │     grid = A7                                                                           │                         │
│ │     self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │                         │
│ └─────────────────────────────────────────────────────────────────────────────────────────┘                         │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\map\fleet.py:492 in goto                                                               │
│                                                                                                                     │
│    489 │   │   │   │   │   self.ensure_edge_insight()                                                               │
│    490 │   │   │   │   │   nodes_ = self.map.find_path(node, step=1)                                                │
│    491 │   │   │   │   │   for node_ in nodes_:                                                                     │
│ >  492 │   │   │   │   │   │   self._goto(node_, expected=expected if node == nodes[-1] else                        │
│        '')                                                                                                          │
│    493 │   │   else:                                                                                                │
│    494 │   │   │   self._goto(location, expected=expected)                                                          │
│    495                                                                                                              │
│                                                                                                                     │
│ ┌──────────────────────────────────────── locals ─────────────────────────────────────────┐                         │
│ │ expected = 'combat'                                                                     │                         │
│ │ location = (0, 6)                                                                       │                         │
│ │     node = (0, 6)                                                                       │                         │
│ │    node_ = (1, 6)                                                                       │                         │
│ │    nodes = [(3, 6), (0, 6)]                                                             │                         │
│ │   nodes_ = [(1, 6), (1, 6), (0, 6)]                                                     │                         │
│ │ optimize = True                                                                         │                         │
│ │     self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │                         │
│ └─────────────────────────────────────────────────────────────────────────────────────────┘                         │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\module\map\fleet.py:367 in _goto                                                              │
│                                                                                                                     │
│    364 │   │   │   │   │   continue                                                                                 │
│    365 │   │   │   │                                                                                                │
│    366 │   │   │   │   if self.handle_walk_out_of_step():                                                           │
│ >  367 │   │   │   │   │   raise MapWalkError('walk_out_of_step')                                                   │
│    368 │   │   │   │                                                                                                │
│    369 │   │   │   │   # Arrive                                                                                     │
│    370 │   │   │   │   arrive_predict = ''                                                                          │
│                                                                                                                     │
│ ┌──────────────────────────────────────────────── locals ────────────────────────────────────────────────┐          │
│ │          ambushed_retry = <module.base.timer.Timer object at 0x000001FDBD2DF1C8>                       │          │
│ │          arrive_checker = False                                                                        │          │
│ │          arrive_predict = ''                                                                           │          │
│ │            arrive_timer = <module.base.timer.Timer object at 0x000001FDBD2A2B48>                       │          │
│ │ arrive_unexpected_timer = <module.base.timer.Timer object at 0x000001FDBD2BFE88>                       │          │
│ │                 arrived = False                                                                        │          │
│ │                expected = 'combat'                                                                     │          │
│ │                   extra = 0                                                                            │          │
│ │                    grid = B6                                                                           │          │
│ │               is_portal = False                                                                        │          │
│ │                location = (1, 6)                                                                       │          │
│ │      may_submarine_icon = False                                                                        │          │
│ │                 mystery = False                                                                        │          │
│ │                  result = 'nothing'                                                                    │          │
│ │          result_mystery = ''                                                                           │          │
│ │                    self = <campaign.war_archives_20210624_cn.a2.Campaign object at 0x000001FDBC5BB988> │          │
│ │            walk_timeout = <module.base.timer.Timer object at 0x000001FDBD2DFBC8>                       │          │
│ └────────────────────────────────────────────────────────────────────────────────────────────────────────┘          │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
MapWalkError: walk_out_of_step                                                                                         
2022-07-27 22:56:56.943 | WARNING | Saving error: ./log/error/1658933816943

截图

2022-07-27_22-56-55-803014

还有别的吗?

上述截图目录中的log.txt文件如下

log.txt

Harry2020rookie avatar Jul 27 '22 16:07 Harry2020rookie