新活动 虹彩的终幕曲 c2寻敌卡死
在提问之前...
- [X] 我已经搜索了现有的 issues
- [X] 我在提问题之前至少花费了 5 分钟来思考和准备
- [X] 我已经阅读了 Wiki 中的 常见问题(FAQ)
- [X] 我正在使用最新版的 Alas
描述你的问题
c2,一般打完第一场小怪之后,ALAS手动寻敌会卡死,看不太懂bug信息
如何复现
No response
预期行为
No response
相关 Logs
···
────────────────────────────────────────────────────── BATTLE_0 ───────────────────────────────────────────────────────
2024-06-21 21:02:03.565 | INFO | BATTLE_0
2024-06-21 21:02:03.566 | INFO | Using function: battle_0
2024-06-21 21:02:03.566 | INFO | <<< CLEAR SIREN >>>
2024-06-21 21:02:03.567 | INFO | sort=('weight', 'cost_2')
2024-06-21 21:02:03.568 | INFO | Grids: [C7, F6]
2024-06-21 21:02:03.569 | INFO | targetEnemyScale:S1_enemy_first
2024-06-21 21:02:03.569 | INFO | Clear enemy: C7
2024-06-21 21:02:03.570 | INFO | Fleet_2: A3
2024-06-21 21:02:03.579 | INFO | Bind task ['General', 'Alas', 'TaskBalancer', 'EventGeneral', 'Event']
2024-06-21 21:02:03.580 | INFO | Save config ./config\alas.json, Event.Emotion.Fleet1Value=150,
Event.Emotion.Fleet1Record=datetime.datetime(2024, 6, 21, 21, 2, 3), Event.Emotion.Fleet2Value=135,
Event.Emotion.Fleet2Record=datetime.datetime(2024, 6, 21, 21, 2, 3)
2024-06-21 21:02:03.586 | INFO | [Emotion fleet_1] 150
2024-06-21 21:02:03.587 | INFO | [Emotion fleet_2] 135
2024-06-21 21:02:03.588 | INFO | Fleet set to 1
2024-06-21 21:02:03.592 | INFO | Fleet: 2, fleet_current_index: 1
2024-06-21 21:02:03.593 | INFO | In sight: C7
2024-06-21 21:02:03.593 | INFO | Focus to: B5
2024-06-21 21:02:03.594 | INFO | Map swipe: (0, 2)
2024-06-21 21:02:03.596 | INFO | Swipe ( 760, 400) -> ( 764, 200)
2024-06-21 21:02:03.859 | INFO | [prev.center_offset] [0.52380478 0.58672896]
2024-06-21 21:02:03.948 | INFO | tile_center: 0.955 (good match)
2024-06-21 21:02:03.955 | INFO | 0.036s edge_lines: 0 hori, 1 vert
2024-06-21 21:02:03.956 | INFO | Edges: / homo_loca: ( 24, 79)
2024-06-21 21:02:03.959 | INFO | center_loca: (1, 3)
2024-06-21 21:02:03.960 | INFO | [view.center_offset] [0.50951922 0.35815739]
2024-06-21 21:02:03.969 | INFO | Map swipe predict: None (0.008s, no match)
2024-06-21 21:02:03.970 | INFO | Camera: B5
2024-06-21 21:02:03.970 | INFO | Camera: B5
2024-06-21 21:02:04.043 | INFO | 0.072s predict: 36
2024-06-21 21:02:04.044 | INFO | -- -- -- -- -- -- --
2024-06-21 21:02:04.045 | INFO | -- -- -- -- -- -- ..
2024-06-21 21:02:04.046 | INFO | Fl -- -- -- -- -- ..
2024-06-21 21:02:04.046 | INFO | -- -- -- 1E 2E -- ..
2024-06-21 21:02:04.047 | INFO | -- -- -- -- -- -- ..
2024-06-21 21:02:04.048 | INFO | -- -- CA -- -- .. ..
2024-06-21 21:02:04.048 | INFO | Map swipe: (0, 0)
2024-06-21 21:02:04.049 | INFO | Global C7 (camera=B5) -> Local C6 (center=B4)
2024-06-21 21:02:04.050 | INFO | Click ( 797, 586) @ C6
2024-06-21 21:02:08.446 | INFO | Skip map cat attack
2024-06-21 21:02:08.447 | INFO | Click (1196, 673) @ MAP_CAT_ATTACK
2024-06-21 21:02:09.943 | INFO | [Loading] 9%
2024-06-21 21:02:09.945 | INFO | Combat preparation.
2024-06-21 21:02:09.953 | INFO | Bind task ['General', 'Alas', 'TaskBalancer', 'EventGeneral', 'Event']
2024-06-21 21:02:09.954 | INFO | Save config ./config\alas.json, Event.Emotion.Fleet1Value=150,
Event.Emotion.Fleet1Record=datetime.datetime(2024, 6, 21, 21, 2, 9), Event.Emotion.Fleet2Value=135,
Event.Emotion.Fleet2Record=datetime.datetime(2024, 6, 21, 21, 2, 9)
2024-06-21 21:02:09.971 | INFO | [Emotion fleet_1] 150
2024-06-21 21:02:09.972 | INFO | [Emotion fleet_2] 135
2024-06-21 21:02:09.976 | INFO | [Loading] 9%
2024-06-21 21:02:09.977 | INFO | Screenshot interval set to 1.0s
2024-06-21 21:02:13.947 | INFO | <<< EMOTION REDUCE >>>
2024-06-21 21:02:13.955 | INFO | Bind task ['General', 'Alas', 'TaskBalancer', 'EventGeneral', 'Event']
2024-06-21 21:02:13.957 | INFO | Save config ./config\alas.json, Event.Emotion.Fleet1Value=150,
Event.Emotion.Fleet1Record=datetime.datetime(2024, 6, 21, 21, 2, 13), Event.Emotion.Fleet2Value=133,
Event.Emotion.Fleet2Record=datetime.datetime(2024, 6, 21, 21, 2, 13)
2024-06-21 21:02:13.973 | INFO | [Emotion fleet_1] 150
2024-06-21 21:02:13.974 | INFO | [Emotion fleet_2] 133
2024-06-21 21:02:13.974 | INFO | Combat execute
2024-06-21 21:02:19.952 | INFO | Combat auto check timer reached
2024-06-21 21:02:37.366 | INFO | Click (1015, 666) @ BATTLE_STATUS_S
2024-06-21 21:02:37.417 | INFO | Combat status
2024-06-21 21:02:37.418 | INFO | [expected_end] with_searching
2024-06-21 21:02:37.418 | INFO | Screenshot interval set to 0.3s
2024-06-21 21:02:37.806 | INFO | Click (1028, 667) @ BATTLE_STATUS_S
2024-06-21 21:02:37.927 | INFO | Click (1025, 664) @ GET_ITEMS_1
2024-06-21 21:02:38.222 | INFO | Click (1193, 643) @ EXP_INFO_S
2024-06-21 21:02:42.911 | INFO | Enemy searching appeared.
2024-06-21 21:02:42.976 | INFO | Combat end.
2024-06-21 21:02:42.989 | INFO | [HP] 98% ____ ____ 96% ____ ____
2024-06-21 21:02:43.030 | INFO | [LevelOcr 0.040s] [14, 0, 0, 100, 0, 0]
2024-06-21 21:02:43.031 | INFO | [LEVEL] 14, 0, 0, 100, 0, 0
2024-06-21 21:02:43.032 | INFO | Global C7 (camera=B5) -> Local C6 (center=B4)
2024-06-21 21:02:43.273 | INFO | Arrive C7 (is_fleet)
2024-06-21 21:02:43.274 | INFO | Arrive C7 confirm. Result: combat. Expected: combat_siren
2024-06-21 21:02:43.275 | ERROR | KeyError: ()
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\alas.py:69 in run │
│ │
│ 66 │ │ try: │
│ 67 │ │ │ if not skip_first_screenshot: │
│ 68 │ │ │ │ self.device.screenshot() │
│ > 69 │ │ │ self.getattribute(command)() │
│ 70 │ │ │ return True │
│ 71 │ │ except TaskEnd: │
│ 72 │ │ │ return True │
│ │
│ ┌──────────────────────────────────── locals ────────────────────────────────────┐ │
│ │ command = 'event' │ │
│ │ e = KeyError(()) │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x000002369DC52288> │ │
│ │ skip_first_screenshot = False │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\alas.py:359 in event │
│ │
│ 356 │ def event(self): │
│ 357 │ │ from module.campaign.run import CampaignRun │
│ 358 │ │ CampaignRun(config=self.config, device=self.device).run( │
│ > 359 │ │ │ name=self.config.Campaign_Name, folder=self.config.Campaign_Event, │
│ mode=self.config.Campaign_Mode) │
│ 360 │ │
│ 361 │ def event2(self): │
│ 362 │ │ from module.campaign.run import CampaignRun │
│ │
│ ┌─────────────────────────────── locals ───────────────────────────────┐ │
│ │ CampaignRun = <class 'module.campaign.run.CampaignRun'> │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x000002369DC52288> │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\module\campaign\run.py:387 in run │
│ │
│ 384 │ │ │ self.device.stuck_record_clear() │
│ 385 │ │ │ self.device.click_record_clear() │
│ 386 │ │ │ try: │
│ > 387 │ │ │ │ self.campaign.run() │
│ 388 │ │ │ except ScriptEnd as e: │
│ 389 │ │ │ │ logger.hr('Script end') │
│ 390 │ │ │ │ logger.info(str(e)) │
│ │
│ ┌──────────────────────────────── locals ─────────────────────────────────┐ │
│ │ folder = 'event_20220428_cn' │ │
│ │ mode = 'normal' │ │
│ │ name = 'c2' │ │
│ │ self = <module.campaign.run.CampaignRun object at 0x00000236F2288D48> │ │
│ │ total = 0 │ │
│ └─────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\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 ───────────────────────────────────┐ │
│ │ _ = 0 │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └──────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\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 = 0 │ │
│ │ result = False │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\module\base\decorator.py:70 in wrapper │
│ │
│ 67 │ │ │ │ │ if not all(flag): │
│ 68 │ │ │ │ │ │ continue │
│ 69 │ │ │ │ │ │
│ > 70 │ │ │ │ │ return record['func'](self, *args, **kwargs) │
│ 71 │ │ │ │ │
│ 72 │ │ │ │ logger.warning(f'No option fits for {name}, using the last define │
│ func.') │
│ 73 │ │ │ │ return func(self, *args, **kwargs) │
│ │
│ ┌────────────────────────────────────── locals ───────────────────────────────────────┐ │
│ │ args = () │ │
│ │ cls = <class 'module.base.decorator.Config'> │ │
│ │ flag = [True, True] │ │
│ │ func = <function CampaignBase.battle_function at 0x000002369F77A318> │ │
│ │ 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 0x000002369F77A318> │ │
│ │ } │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └─────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\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 = 0 │ │
│ │ func = <bound method Campaign.battle_0 of <campaign.event_20220428_cn.c2.Campaign object at │ │
│ │ 0x00000236D648BC88>> │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\campaign\event_20220428_cn\c2.py:95 in battle_0 │
│ │
│ 92 │ ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C' │
│ 93 │ │
│ 94 │ def battle_0(self): │
│ > 95 │ │ if self.clear_siren(): │
│ 96 │ │ │ return True │
│ 97 │ │ if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0): │
│ 98 │ │ │ return True │
│ │
│ ┌─────────────────────────────────── locals ───────────────────────────────────┐ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └──────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\module\map\map.py:470 in clear_siren │
│ │
│ 467 │ │ │ │ expected = 'fortress' │
│ 468 │ │ │ else: │
│ 469 │ │ │ │ expected = 'siren' │
│ > 470 │ │ │ self.clear_chosen_enemy(grids[0], expected=expected) │
│ 471 │ │ │ return True │
│ 472 │ │ │
│ 473 │ │ return False │
│ │
│ ┌───────────────────────────────────── locals ─────────────────────────────────────┐ │
│ │ expected = 'siren' │ │
│ │ grids = <module.map.map_grids.SelectedGrids object at 0x00000236FC402988> │ │
│ │ kwargs = {'sort': ('weight', 'cost_2')} │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └──────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\module\map\map.py:31 in clear_chosen_enemy │
│ │
│ 28 │ │ self.show_fleet() │
│ 29 │ │ if self.emotion.is_calculate and self.config.Campaign_UseFleetLock: │
│ 30 │ │ │ self.emotion.wait(fleet_index=self.fleet_current_index) │
│ > 31 │ │ self.goto(grid, expected=expected) │
│ 32 │ │ │
│ 33 │ │ self.full_scan() │
│ 34 │ │ self.find_path_initial() │
│ │
│ ┌─────────────────────────────────────── locals ───────────────────────────────────────┐ │
│ │ battle_count = 0 │ │
│ │ expected = 'combat_siren' │ │
│ │ grid = C7 │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └──────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\module\map\fleet.py:506 in goto │
│ │
│ 503 │ │ │ │ │ for node_ in nodes_: │
│ 504 │ │ │ │ │ │ self.goto(node, expected=expected if node == nodes[-1] else │
│ '') │
│ 505 │ │ else: │
│ > 506 │ │ │ self._goto(location, expected=expected) │
│ 507 │ │
│ 508 │ def find_path_initial(self): │
│ 509 │ │ """ │
│ │
│ ┌───────────────────────────────────── locals ─────────────────────────────────────┐ │
│ │ expected = 'combat_siren' │ │
│ │ location = (2, 6) │ │
│ │ optimize = True │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ └──────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\module\map\fleet.py:446 in goto │
│ │
│ 443 │ │ │ │ │ self.device.click(grid) │
│ 444 │ │ │ │ break │
│ 445 │ │ │
│ > 446 │ │ self.map[self.fleet_current].is_fleet = False │
│ 447 │ │ self.map[location].wipe_out() │
│ 448 │ │ self.map[location].is_fleet = True │
│ 449 │ │ self.setattr('fleet%s_location' % self.fleet_current_index, location) │
│ │
│ ┌──────────────────────────────────────────── locals ─────────────────────────────────────────────┐ │
│ │ ambushed_retry = Timer(limit=0.247/5.0, count=1/2) │ │
│ │ arrive_checker = True │ │
│ │ arrive_predict = '(is_fleet)' │ │
│ │ arrive_timer = Timer(limit=0.007/5.0, count=0/2) │ │
│ │ arrive_unexpected_timer = Timer(limit=0.007/6.0, count=0/6) │ │
│ │ arrived = True │ │
│ │ expected = 'combat_siren' │ │
│ │ extra = 4.5 │ │
│ │ grid = C6 │ │
│ │ is_portal = False │ │
│ │ location = (2, 6) │ │
│ │ may_submarine_icon = False │ │
│ │ mystery = False │ │
│ │ result = 'combat' │ │
│ │ result_mystery = '' │ │
│ │ self = <campaign.event_20220428_cn.c2.Campaign object at 0x00000236D648BC88> │ │
│ │ walk_timeout = Timer(limit=0.248/20, count=2/0) │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Desktop_Files\azurlane\AzurLaneAutoScript\module\map\map_base.py:50 in getitem │
│ │
│ 47 │ │ Returns: │
│ 48 │ │ │ GridInfo: │
│ 49 │ │ """ │
│ > 50 │ │ return self.grids[tuple(item)] │
│ 51 │ │
│ 52 │ def contains(self, item): │
│ 53 │ │ return tuple(item) in self.grids │
│ │
│ ┌─────────────────────────────── locals ────────────────────────────────┐ │
│ │ item = () │ │
│ │ self = <module.map.map_base.CampaignMap object at 0x00000236FC3DDC88> │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
KeyError: ()
2024-06-21 21:02:43.556 | WARNING | Saving error: ./log/error/1718974963556
···
截图
还有别的吗?
No response