侵蚀一练级报错与出错
Opened this issue · 2 comments
aiken-yao commented
在提问之前...
- 我已经搜索了现有的 issues
- 我在提问题之前至少花费了 5 分钟来思考和准备
- 我已经阅读了 Wiki 中的 常见问题(FAQ)
- 我正在使用最新版的 Alas
描述你的问题
1.侵蚀一练级时经常出现Image to detect is not in_map错误导致停止
2.侵蚀一运行过程中战斗结果错误识别为warning:Battle Status D
如何复现
- 前往 '...'
- 点击 '....'
- 滑动到 '....'
- 出现问题
预期行为
No response
相关 Logs
Traceback (most recent call last) ─────────────────────────────────────────┐
│ │
│ D:\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 = 'opsi_hazard1_leveling' │ │
│ │ e = MapDetectionError('Image to detect is not in_map') │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x000001DE6AC10408> │ │
│ │ skip_first_screenshot = False │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
│ D:\AzurLaneAutoScript\alas.py:335 in opsi_hazard1_leveling │
│ │
│ 332 │ │
│ 333 │ def opsi_hazard1_leveling(self): │
│ 334 │ │ from module.campaign.os_run import OSCampaignRun │
│ > 335 │ │ OSCampaignRun(config=self.config, device=self.device).opsi_hazard1_leveling() │
│ 336 │ │
│ 337 │ def opsi_cross_month(self): │
│ 338 │ │ from module.campaign.os_run import OSCampaignRun │
│ │
│ ┌──────────────────────────────── locals ────────────────────────────────┐ │
│ │ OSCampaignRun = <class 'module.campaign.os_run.OSCampaignRun'> │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x000001DE6AC10408> │ │
│ └────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\campaign\os_run.py:67 in opsi_hazard1_leveling │
│ │
│ 64 │ def opsi_hazard1_leveling(self): │
│ 65 │ │ try: │
│ 66 │ │ │ self.load_campaign() │
│ > 67 │ │ │ self.campaign.os_hazard1_leveling() │
│ 68 │ │ except ActionPointLimit: │
│ 69 │ │ │ self.config.task_delay(server_update=True) │
│ 70 │
│ │
│ ┌────────────────────────────────── locals ──────────────────────────────────┐ │
│ │ self = <module.campaign.os_run.OSCampaignRun object at 0x000001DE334910C8> │ │
│ └────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\os\operation_siren.py:457 in os_hazard1_leveling │
│ │
│ 454 │ │ │ if self.zone.zone_id != zone or not self.is_zone_name_hidden: │
│ 455 │ │ │ │ self.globe_goto(self.name_to_zone(zone), types='SAFE', refresh=True) │
│ 456 │ │ │ self.fleet_set(self.config.OpsiFleet_Fleet) │
│ > 457 │ │ │ self.run_strategic_search() │
│ 458 │ │ │ │
│ 459 │ │ │ self.handle_after_auto_search() │
│ 460 │ │ │ self.config.check_task_switch() │
│ │
│ ┌───────────────────────────────────────── locals ──────────────────────────────────────────┐ │
│ │ keep_current_ap = True │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ │ zone = 22 │ │
│ └───────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\os\map.py:737 in run_strategic_search │
│ │
│ 734 │ │ self._solved_map_event = set() │
│ 735 │ │ self._solved_fleet_mechanism = False │
│ 736 │ │ self.clear_question() │
│ > 737 │ │ self.map_rescan() │
│ 738 │ │
│ 739 │ def map_rescan_current(self, drop=None): │
│ 740 │ │ """ │
│ │
│ ┌──────────────────────────────────── locals ────────────────────────────────────┐ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\os\map.py:890 in map_rescan │
│ │
│ 887 │ │ │ │ logger.attr('Solved_map_event', self._solved_map_event) │
│ 888 │ │ │ │ self.fleet_set(self.config.OpsiFleet_Fleet) │
│ 889 │ │ │ │ return False │
│ > 890 │ │ │ result = self.map_rescan_once(rescan_mode=rescan_mode, drop=drop) │
│ 891 │ │ │ if not result: │
│ 892 │ │ │ │ logger.attr('Solved_map_event', self._solved_map_event) │
│ 893 │ │ │ │ self.fleet_set(self.config.OpsiFleet_Fleet) │
│ │
│ ┌─────────────────────────────────────── locals ────────────────────────────────────────┐ │
│ │ _ = 0 │ │
│ │ drop = None │ │
│ │ rescan_mode = 'full' │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ └───────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\os\map.py:859 in map_rescan_once │
│ │
│ 856 │ │ │
│ 857 │ │ if rescan_mode == 'full': │
│ 858 │ │ │ logger.hr('Map rescan full', level=2) │
│ > 859 │ │ │ self.map_init(map_=None) │
│ 860 │ │ │ queue = self.map.camera_data │
│ 861 │ │ │ while len(queue) > 0: │
│ 862 │ │ │ │ logger.hr(f'Map rescan {queue[0]}') │
│ │
│ ┌─────────────────────────────────────── locals ────────────────────────────────────────┐ │
│ │ drop = None │ │
│ │ rescan_mode = 'full' │ │
│ │ result = False │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ └───────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\map\fleet.py:840 in map_init │
│ │
│ 837 │ │ """ │
│ 838 │ │ logger.hr('Map init') │
│ 839 │ │ self.map_data_init(map_) │
│ > 840 │ │ self.map_control_init() │
│ 841 │ │
│ 842 │ def map_data_init(self, map_): │
│ 843 │ │ """ │
│ │
│ ┌──────────────────────────────────── locals ────────────────────────────────────┐ │
│ │ map_ = None │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\os\fleet.py:98 in map_control_init │
│ │
│ 95 │ │ self.hp_get() │
│ 96 │ │ self.lv_reset() │
│ 97 │ │ self.lv_get() │
│ > 98 │ │ self.ensure_edge_insight(preset=self.map.in_map_swipe_preset_data, │
│ swipe_limit=(6, 5)) │
│ 99 │ │ # self.full_scan(must_scan=self.map.camera_data_spawn_point) │
│ 100 │ │ # self.find_current_fleet() │
│ 101 │ │ # self.find_path_initial() │
│ │
│ ┌──────────────────────────────────── locals ────────────────────────────────────┐ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\map\camera.py:374 in ensure_edge_insight │
│ │
│ 371 │ │ │ │
│ 372 │ │ │ if len(record) > 0: │
│ 373 │ │ │ │ # Swipe even if two edges insight, this will avoid some embarrassing │
│ camera position. │
│ > 374 │ │ │ │ self.map_swipe((x, y)) │
│ 375 │ │ │ │
│ 376 │ │ │ record.append((x, y)) │
│ 377 │
│ │
│ ┌────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │ preset = None │ │
│ │ record = [(0, -5), (0, -5), (0, -5), (0, -5)] │ │
│ │ reverse = False │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ │ skip_first_update = True │ │
│ │ swipe_limit = (6, 5) │ │
│ │ x = 0 │ │
│ │ x_swipe = 6 │ │
│ │ y = -5 │ │
│ │ y_swipe = -5 │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\map\camera.py:85 in map_swipe │
│ │
│ 82 │ │ self._prev_swipe = vector │
│ 83 │ │ vector = np.array(vector) │
│ 84 │ │ vector = np.array([0.5, 0.5]) - self.view.center_offset + vector │
│ > 85 │ │ return self._map_swipe(vector) │
│ 86 │ │
│ 87 │ def focus_to_grid_center(self, tolerance=None): │
│ 88 │ │ """ │
│ │
│ ┌───────────────────────────────────── locals ─────────────────────────────────────┐ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ │ vector = array([-0.00890036, -5.00640643]) │ │
│ └──────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\os\camera.py:20 in _map_swipe │
│ │
│ 17 │ fleet_current: tuple │
│ 18 │ │
│ 19 │ def _map_swipe(self, vector, box=(239, 128, 993, 628)): │
│ > 20 │ │ return super()._map_swipe(vector, box=box) │
│ 21 │ │
│ 22 │ def _view_init(self): │
│ 23 │ │ if not hasattr(self, 'view'): │
│ │
│ ┌────────────────────────────────────── locals ───────────────────────────────────────┐ │
│ │ __class__ = <class 'module.os.camera.OSCamera'> │ │
│ │ box = (239, 128, 993, 628) │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ │ vector = array([-0.00890036, -5.00640643]) │ │
│ └─────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\map\camera.py:62 in _map_swipe │
│ │
│ 59 │ │ │ self.device.swipe_vector(vector, name=name, box=box, │
│ whitelist_area=whitelist, blacklist_area=blacklist) │
│ 60 │ │ │ # Donno why initial commit have a sleep here │
│ 61 │ │ │ # self.device.sleep(0.3) │
│ > 62 │ │ │ self.update(wait_swipe=True) │
│ 63 │ │ │ return True │
│ 64 │ │ else: │
│ 65 │ │ │ # Drop swipe │
│ │
│ ┌────────────────────────────────────── locals ───────────────────────────────────────┐ │
│ │ blacklist = [] │ │
│ │ box = (239, 128, 993, 628) │ │
│ │ distance = array([114.65224543, 81.33412465]) │ │
│ │ name = 'MAP_SWIPE_0_-5' │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ │ vector = array([ 1.02044636, 407.19168428]) │ │
│ │ whitelist = [] │ │
│ └─────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\map\camera.py:301 in update │
│ │
│ 298 │ │ │ │
│ 299 │ │ │ # _update_view() │
│ 300 │ │ │ try: │
│ > 301 │ │ │ │ success = self._update_view() │
│ 302 │ │ │ │ if not success: │
│ 303 │ │ │ │ │ continue │
│ 304 │ │ │ │ logger.attr('view.center_offset', self.view.center_offset) │
│ │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │ allow_error = False │ │
│ │ camera = True │ │
│ │ error_confirm = Timer(limit=5.064/5, count=18/10) │ │
│ │ is_grid_center = <function Camera.update.<locals>.is_grid_center at 0x000001DE338D6678> │ │
│ │ is_still_prev = <function Camera.update.<locals>.is_still_prev at 0x000001DE338D6C18> │ │
│ │ prev_center_offset = array([0.50890036, 0.50640643]) │ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ │ success = False │ │
│ │ swipe_wait_timeout = Timer(limit=5.064/0.35, count=19/1) │ │
│ │ swiped = True │ │
│ │ wait_swipe = True │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\map\camera.py:199 in _update_view │
│ │
│ 196 │ │ │ │ │ self.device.click(GAME_TIPS) │
│ 197 │ │ │ │ │ return False │
│ 198 │ │ │ │ else: │
│ > 199 │ │ │ │ │ raise e │
│ 200 │ │ │ elif 'Camera outside map' in str(e): │
│ 201 │ │ │ │ string = str(e) │
│ 202 │ │ │ │ logger.warning(string) │
│ │
│ ┌──────────────────────────────────── locals ────────────────────────────────────┐ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\AzurLaneAutoScript\module\map\camera.py:119 in _update_view │
│ │
│ 116 │ │ │ │ │ and not self.is_in_strategy_submarine_move() \ │
│ 117 │ │ │ │ │ and not self.is_in_strategy_mob_move(): │
│ 118 │ │ │ │ logger.warning('Image to detect is not in_map') │
│ > 119 │ │ │ │ raise MapDetectionError('Image to detect is not in_map') │
│ 120 │ │ │ self.view.load(self.device.image) │
│ 121 │ │ except MapDetectionError as e: │
│ 122 │ │ │ if self.info_bar_count(): │
│ │
│ ┌──────────────────────────────────── locals ────────────────────────────────────┐ │
│ │ self = <module.os.operation_siren.OperationSiren object at 0x000001DE1B4B61C8> │ │
│ └────────────────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
MapDetectionError: Image to detect is not in_map
2024-11-04 14:03:31.089 | WARNING | Saving error: ./log/error/1730700211088
截图
还有别的吗?
No response
LmeSzinc commented
上传 ./log/error/1730700211088