LmeSzinc / AzurLaneAutoScript

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

Hard farm in map 8-1 crashes the app. #902

Closed Josexv1 closed 2 years ago

Josexv1 commented 2 years ago

Before you asking

Describe the bug

Hard map 8-1 crashes the app, doesn't crash the GUI but stops the app.

To Reproduce

  1. Go to 'Hard'
  2. Click on 'Select 8-1'
  3. Scroll down to '....'
  4. See error

Expected behavior

The map runs without issue.

Relevant log output

═══════════════════════════════════════════════════════════════════════════════════
                                       HARD                                        
═══════════════════════════════════════════════════════════════════════════════════
══════════════════════════════════ CAMPAIGN HARD ══════════════════════════════════
INFO     17:09:07.215 │ <<< UI ENSURE >>>                                          
INFO     17:09:07.415 │ [UI] page_campaign                                         
INFO     17:09:07.425 │ Already at page_campaign                                   
INFO     17:09:07.474 │ [Mode_switch_1] normal                                     
INFO     17:09:07.486 │ Click ( 113,  655) @ SWITCH_1_NORMAL                       
INFO     17:09:07.493 │ <<< MINITOUCH INIT >>>                                     
INFO     17:09:09.507 │ Minitouch bind to port 20573                               
INFO     17:09:09.582 │ Minitouch forward port 20573                               
INFO     17:09:09.592 │ v 1                                                        
INFO     17:09:09.603 │ ^ 10 1280 720 0                                            
INFO     17:09:09.611 │ $ 2970                                                     
INFO     17:09:09.620 │ minitouch running on port: 20573, pid: 2970                
INFO     17:09:09.630 │ max_contact: 10; max_x: 1280; max_y: 720; max_pressure: 0  
INFO     17:09:10.617 │ [Mode_switch_1] unknown                                    
INFO     17:09:11.480 │ [Mode_switch_1] hard                                       
INFO     17:09:11.490 │ <<< UI ENSURE INDEX >>>                                    
INFO     17:09:11.861 │ Loading OCR model: ./bin/cnocr_models/azur_lane            
INFO     17:09:12.089 │ [campaign 0.268s] ['7-2', '7--3', '7--4', '7-1']           
INFO     17:09:12.107 │ [Chapter] 7                                                
INFO     17:09:12.120 │ [Stage] 7-2, 7-3, 7-4, 7-1                                 
INFO     17:09:12.136 │ [Index] 7                                                  
INFO     17:09:12.151 │ Click (1224,  377) @ CHAPTER_NEXT                          
INFO     17:09:13.615 │ No stage found.                                            
INFO     17:09:15.056 │ [campaign 0.196s] ['8--1', '8--2', '8--4', '8--3']         
INFO     17:09:15.074 │ [Chapter] 8                                                
INFO     17:09:15.089 │ [Stage] 8-1, 8-2, 8-4, 8-3                                 
INFO     17:09:15.106 │ [Index] 8                                                  
INFO     17:09:15.125 │ [Mode_switch_1] hard                                       
INFO     17:09:15.141 │ Click (  93,  659) @ SWITCH_1_HARD                         
INFO     17:09:16.016 │ [Mode_switch_1] unknown                                    
INFO     17:09:16.846 │ [Mode_switch_1] normal                                     
INFO     17:09:16.870 │ <<< UI ENSURE INDEX >>>                                    
INFO     17:09:17.250 │ [campaign 0.096s] ['8--1', '8--2', '8--4', '8--3']         
INFO     17:09:17.264 │ [Chapter] 8                                                
INFO     17:09:17.274 │ [Stage] 8-1, 8-2, 8-4, 8-3                                 
INFO     17:09:17.289 │ [Index] 8                                                  
INFO     17:09:17.338 │ [OCR_HARD_REMAIN 0.037s] 3                                 
INFO     17:09:17.352 │ [Remain] 3                                                 
─────────────────────────────────────── 8-1 ───────────────────────────────────────
INFO     17:09:17.371 │ <<< ENTER MAP >>>                                          
INFO     17:09:17.518 │ Click ( 548,  223) @ 8-1                                   
INFO     17:09:20.333 │ [MAP_CLEAR_ALL_THIS_TIME] False                            
INFO     17:09:20.350 │ [Map_info] 0%,                                             
INFO     17:09:20.366 │ [StopCondition_MapAchievement] non_stop                    
INFO     17:09:20.415 │ No auto search option.                                     
INFO     17:09:20.435 │ Click ( 951,  522) @ MAP_PREPARATION                       
INFO     17:09:21.967 │ Using fleet: [1, 2, 0]                                     
INFO     17:09:21.985 │ [Light_orange_line] 2                                      
INFO     17:09:21.999 │ Hard Campaign. No fleet preparation                        
INFO     17:09:22.010 │ Click (1065,  603) @ FLEET_PREPARATION                     
INFO     17:09:31.246 │ Enemy searching timeout.                                   
INFO     17:09:32.435 │ No fleet lock option.                                      
INFO     17:09:32.450 │ <<< MAP INIT >>>                                           
INFO     17:09:32.469 │ Load map_data, has_loop=False, use_loop=False              
INFO     17:09:32.485 │ Load spawn_data, has_loop=False, use_loop=False            
INFO     17:09:32.499 │ grid_connection: wall=False, portal=False                  
INFO     17:09:32.518 │ Load mechanism, land_base=False, maze=False, fortress=False
INFO     17:09:33.983 │           vanish_point: (  635, -1673)                     
INFO     17:09:34.017 │          distant_point: (  635, -1673)                     
ERROR    17:09:34.057 │ Vanish point and distant point too close                   
         ╭────────────────── Traceback (most recent call last) ───────────────────╮
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\alas.py:56 in run                       │
         │                                                                        │
         │    54 │   def run(self, command):                                      │
         │    55 │   │   try:                                                     │
         │ ❱  56 │   │   │   self.__getattribute__(command)()                     │
         │    57 │   │   │   return True                                          │
         │    58 │   │   except TaskEnd:                                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ command = 'hard'                                                   │ │
         │ │       e = MapDetectionError('Vanish point and distant point too    │ │
         │ │           close')                                                  │ │
         │ │    self = <alas.AzurLaneAutoScript object at 0x0000019F19F18AC8>   │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │ D:\Software\AzurLaneAutoScript\alas.py:192 in hard                     │
         │                                                                        │
         │   190 │   def hard(self):                                              │
         │   191 │   │   from module.hard.hard import CampaignHard                │
         │ ❱ 192 │   │   CampaignHard(config=self.config, device=self.device).run │
         │   193 │                                                                │
         │   194 │   def exercise(self):                                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ CampaignHard = <class 'module.hard.hard.CampaignHard'>             │ │
         │ │         self = <alas.AzurLaneAutoScript object at                  │ │
         │ │                0x0000019F19F18AC8>                                 │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\hard\hard.py:47 in run           │
         │                                                                        │
         │   45 │   │   logger.attr('Remain', remain)                             │
         │   46 │   │   for n in range(remain):                                   │
         │ ❱ 47 │   │   │   self.campaign.run()                                   │
         │   48 │   │                                                             │
         │   49 │   │   self.campaign.ensure_auto_search_exit()                   │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ chapter = '8'                                                      │ │
         │ │  module = <module 'campaign.campaign_main.campaign_8_1' from       │ │
         │ │           'D:\\Software\\AzurLaneAutoScript\\campaign\\campaign_m… │ │
         │ │       n = 0                                                        │ │
         │ │    name = 'campaign_8_1'                                           │ │
         │ │  remain = 3                                                        │ │
         │ │    self = <module.hard.hard.CampaignHard object at                 │ │
         │ │           0x0000019F2A4F3F08>                                      │ │
         │ │   stage = '1'                                                      │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\campaign\campaign_base.py:129 in │
         │ run                                                                    │
         │                                                                        │
         │   127 │   │   if not self.map_is_auto_search:                          │
         │   128 │   │   │   self.handle_map_fleet_lock()                         │
         │ ❱ 129 │   │   │   self.map_init(self.MAP)                              │
         │   130 │   │   else:                                                    │
         │   131 │   │   │   self.map = self.MAP                                  │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ self = <campaign.campaign_hard.campaign_hard.Campaign object at    │ │
         │ │        0x0000019F3A7A1C48>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map\fleet.py:782 in map_init     │
         │                                                                        │
         │    780 │   │   logger.hr('Map init')                                   │
         │    781 │   │   self.map_data_init(map_)                                │
         │ ❱  782 │   │   self.map_control_init()                                 │
         │    783 │                                                               │
         │    784 │   def map_data_init(self, map_):                              │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ map_ = <module.map.map_base.CampaignMap object at                  │ │
         │ │        0x0000019F3AA23488>                                         │ │
         │ │ self = <campaign.campaign_hard.campaign_hard.Campaign object at    │ │
         │ │        0x0000019F3A7A1C48>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map\fleet.py:822 in              │
         │ map_control_init                                                       │
         │                                                                        │
         │    820 │   │   Such as select strategy, calculate hp and level, init c │
         │        map scan.                                                       │
         │    821 │   │   """                                                     │
         │ ❱  822 │   │   self.update()                                           │
         │    823 │   │   if not self.handle_fleet_reverse():                     │
         │    824 │   │   │   self.fleet_set(index=1)                             │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ self = <campaign.campaign_hard.campaign_hard.Campaign object at    │ │
         │ │        0x0000019F3A7A1C48>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map\camera.py:148 in update      │
         │                                                                        │
         │   146 │   │   │   │   self._map_swipe((-int(x.strip()), -int(y.strip() │
         │   147 │   │   │   else:                                                │
         │ ❱ 148 │   │   │   │   raise e                                          │
         │   149 │   │                                                            │
         │   150 │   │   if self._prev_view is not None and np.linalg.norm(self._ │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ camera = True                                                      │ │
         │ │   self = <campaign.campaign_hard.campaign_hard.Campaign object at  │ │
         │ │          0x0000019F3A7A1C48>                                       │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map\camera.py:113 in update      │
         │                                                                        │
         │   111 │   │   self._view_init()                                        │
         │   112 │   │   try:                                                     │
         │ ❱ 113 │   │   │   self.view.load(self.device.image)                    │
         │   114 │   │   except MapDetectionError as e:                           │
         │   115 │   │   │   if self.info_bar_count():                            │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ camera = True                                                      │ │
         │ │   self = <campaign.campaign_hard.campaign_hard.Campaign object at  │ │
         │ │          0x0000019F3A7A1C48>                                       │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map_detection\view.py:59 in load │
         │                                                                        │
         │    57 │   │   image = self._image_clear_ui(np.array(image))            │
         │    58 │   │   self.image = image                                       │
         │ ❱  59 │   │   super().load(image)                                      │
         │    60 │   │                                                            │
         │    61 │   │   # Create local view map                                  │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ __class__ = <class 'module.map_detection.view.View'>               │ │
         │ │     image = array([[[0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   ...,                                           │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0]],                                    │ │
         │ │             │                                                      │ │
         │ │             │      [[0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   ...,                                           │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0]],                                    │ │
         │ │             │                                                      │ │
         │ │             │      [[0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   ...,                                           │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0]],                                    │ │
         │ │             │                                                      │ │
         │ │             │      ...,                                            │ │
         │ │             │                                                      │ │
         │ │             │      [[0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   ...,                                           │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0]],                                    │ │
         │ │             │                                                      │ │
         │ │             │      [[0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   ...,                                           │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0]],                                    │ │
         │ │             │                                                      │ │
         │ │             │      [[0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   ...,                                           │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0],                                     │ │
         │ │             │   │   [0, 0, 0]]], dtype=uint8)                      │ │
         │ │      self = <module.map_detection.view.View object at              │ │
         │ │             0x0000019F3AABD208>                                    │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map_detection\detector.py:49 in  │
         │ load                                                                   │
         │                                                                        │
         │   47 │   │   │   image: Shape (720, 1280, 3)                           │
         │   48 │   │   """                                                       │
         │ ❱ 49 │   │   self.backend.load(image)                                  │
         │   50 │   │                                                             │
         │   51 │   │   self.left_edge = bool(self.backend.left_edge)             │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ image = array([[[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      ...,                                                │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]]], dtype=uint8)                          │ │
         │ │  self = <module.map_detection.view.View object at                  │ │
         │ │         0x0000019F3AABD208>                                        │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map_detection\homography.py:86   │
         │ in load                                                                │
         │                                                                        │
         │    84 │   │   """                                                      │
         │    85 │   │   if not self.homo_loaded:                                 │
         │ ❱  86 │   │   │   self.load_homography(storage=self.config.HOMO_STORAG │
         │    87 │   │                                                            │
         │    88 │   │   self.detect(image)                                       │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ image = array([[[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      ...,                                                │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]],                                        │ │
         │ │         │                                                          │ │
         │ │         │      [[0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   ...,                                               │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0],                                         │ │
         │ │         │   │   [0, 0, 0]]], dtype=uint8)                          │ │
         │ │  self = <module.map_detection.homography.Homography object at      │ │
         │ │         0x0000019F38F99D08>                                        │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map_detection\homography.py:109  │
         │ in load_homography                                                     │
         │                                                                        │
         │   107 │   │   elif image is not None:                                  │
         │   108 │   │   │   perspective_ = Perspective(self.config)              │
         │ ❱ 109 │   │   │   perspective_.load(image)                             │
         │   110 │   │   │   self.load_homography(perspective=perspective_)       │
         │   111 │   │   elif file is not None:                                   │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │         file = None                                                │ │
         │ │        image = array([[[0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   ...,                                        │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0]],                                 │ │
         │ │                │                                                   │ │
         │ │                │      [[0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   ...,                                        │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0]],                                 │ │
         │ │                │                                                   │ │
         │ │                │      [[0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   ...,                                        │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0]],                                 │ │
         │ │                │                                                   │ │
         │ │                │      ...,                                         │ │
         │ │                │                                                   │ │
         │ │                │      [[0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   ...,                                        │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0]],                                 │ │
         │ │                │                                                   │ │
         │ │                │      [[0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   ...,                                        │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0]],                                 │ │
         │ │                │                                                   │ │
         │ │                │      [[0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   ...,                                        │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0],                                  │ │
         │ │                │   │   [0, 0, 0]]], dtype=uint8)                   │ │
         │ │  perspective = None                                                │ │
         │ │ perspective_ = <module.map_detection.perspective.Perspective       │ │
         │ │                object at 0x0000019F2A8C7E88>                       │ │
         │ │         self = <module.map_detection.homography.Homography object  │ │
         │ │                at 0x0000019F38F99D08>                              │ │
         │ │      storage = None                                                │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\Software\AzurLaneAutoScript\module\map_detection\perspective.py:128 │
         │ in load                                                                │
         │                                                                        │
         │   126 │   │   logger.attr_align('distant_point', point2str(*self.dista │
         │   127 │   │   if np.linalg.norm(np.subtract(self.vanish_point, self.di │
         │ ❱ 128 │   │   │   raise MapDetectionError('Vanish point and distant po │
         │   129 │   │                                                            │
         │   130 │   │   # Re-generate lines. Useless after mid_cleanse function  │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ distance_point_x = 635.1878356933594                               │ │
         │ │           edge_h = <module.map_detection.utils.Lines object at     │ │
         │ │                    0x0000019F2A957908>                             │ │
         │ │           edge_v = <module.map_detection.utils.Lines object at     │ │
         │ │                    0x0000019F2A928F08>                             │ │
         │ │       horizontal = <module.map_detection.utils.Lines object at     │ │
         │ │                    0x0000019F2A98AB08>                             │ │
         │ │            image = array([[185, 186, 186, ..., 211, 211, 211],     │ │
         │ │                    │      [186, 186, 186, ..., 211, 211, 211],     │ │
         │ │                    │      [186, 186, 186, ..., 211, 211, 211],     │ │
         │ │                    │      ...,                                     │ │
         │ │                    │      [247, 247, 247, ..., 255, 255, 255],     │ │
         │ │                    │      [247, 247, 247, ..., 255, 255, 255],     │ │
         │ │                    │      [247, 247, 247, ..., 255, 255, 255]],    │ │
         │ │                    dtype=uint8)                                    │ │
         │ │          inner_h = <module.map_detection.utils.Lines object at     │ │
         │ │                    0x0000019F2A8EB888>                             │ │
         │ │          inner_v = <module.map_detection.utils.Lines object at     │ │
         │ │                    0x0000019F2A912F88>                             │ │
         │ │             self = <module.map_detection.perspective.Perspective   │ │
         │ │                    object at 0x0000019F2A8C7E88>                   │ │
         │ │       start_time = 1643040573.6192124                              │ │
         │ │         vertical = <module.map_detection.utils.Lines object at     │ │
         │ │                    0x0000019F2A98ADC8>                             │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         ╰────────────────────────────────────────────────────────────────────────╯
         MapDetectionError: Vanish point and distant point too close               
WARNING  17:09:39.978 │ Saving error: ./log/error/1643040579978

Screenshots

No response

Anything else?

Also 7-x hard mode doesn't move anywhere.

LmeSzinc commented 2 years ago

Hard Settings

Hard mode for chapter must be unlocked, stage must be in 100% CLEAR condition, and auto search is enabled temporarily. Use Farm Main task to assist unlocking and achieving 100% CLEAR conditions

Read the help text in Hard Setting

Josexv1 commented 2 years ago

Main stage is 100 clear, while the hard stage is at 1 star, if the app needs hard stage to be 100 clear is weird because other stages works, such as 8-4.

If it needs the Hard Stage 100 clear you can close the issue.

Log from Hard stage 8-4 with no star 0% clear.


                                       HARD                                        
═══════════════════════════════════════════════════════════════════════════════════
══════════════════════════════════ CAMPAIGN HARD ══════════════════════════════════
INFO     17:19:06.538 │ <<< UI ENSURE >>>                                          
INFO     17:19:06.921 │ [UI] page_campaign                                         
INFO     17:19:06.936 │ Already at page_campaign                                   
INFO     17:19:06.989 │ [Mode_switch_1] normal                                     
INFO     17:19:07.000 │ Click ( 112,  656) @ SWITCH_1_NORMAL                       
INFO     17:19:07.013 │ <<< MINITOUCH INIT >>>                                     
INFO     17:19:09.024 │ Minitouch bind to port 20538                               
INFO     17:19:09.104 │ Minitouch forward port 20538                               
INFO     17:19:09.113 │ v 1                                                        
INFO     17:19:09.124 │ ^ 10 1280 720 0                                            
INFO     17:19:09.137 │ $ 2970                                                     
INFO     17:19:09.146 │ minitouch running on port: 20538, pid: 2970                
INFO     17:19:09.159 │ max_contact: 10; max_x: 1280; max_y: 720; max_pressure: 0  
INFO     17:19:10.087 │ [Mode_switch_1] unknown                                    
INFO     17:19:11.042 │ [Mode_switch_1] hard                                       
INFO     17:19:11.052 │ <<< UI ENSURE INDEX >>>                                    
INFO     17:19:11.466 │ Loading OCR model: ./bin/cnocr_models/azur_lane            
INFO     17:19:11.726 │ [campaign 0.301s] ['8--1', '8--2', '8--4', '8--3']         
INFO     17:19:11.746 │ [Chapter] 8                                                
INFO     17:19:11.764 │ [Stage] 8-1, 8-2, 8-4, 8-3                                 
INFO     17:19:11.781 │ [Index] 8                                                  
INFO     17:19:11.809 │ [Mode_switch_1] hard                                       
INFO     17:19:11.826 │ Click ( 113,  661) @ SWITCH_1_HARD                         
INFO     17:19:12.843 │ [Mode_switch_1] unknown                                    
INFO     17:19:13.836 │ [Mode_switch_1] normal                                     
INFO     17:19:13.844 │ <<< UI ENSURE INDEX >>>                                    
INFO     17:19:14.306 │ [campaign 0.139s] ['8--1', '8--2', '8--4', '8--3']         
INFO     17:19:14.322 │ [Chapter] 8                                                
INFO     17:19:14.336 │ [Stage] 8-1, 8-2, 8-4, 8-3                                 
INFO     17:19:14.351 │ [Index] 8                                                  
INFO     17:19:14.404 │ [OCR_HARD_REMAIN 0.040s] 3                                 
INFO     17:19:14.416 │ [Remain] 3                                                 
─────────────────────────────────────── 8-4 ───────────────────────────────────────
INFO     17:19:14.435 │ <<< ENTER MAP >>>                                          
INFO     17:19:14.623 │ Click ( 781,  500) @ 8-4                                   
INFO     17:19:17.287 │ [MAP_CLEAR_ALL_THIS_TIME] False                            
INFO     17:19:17.299 │ [Map_info] 0%,                                             
INFO     17:19:17.307 │ [StopCondition_MapAchievement] non_stop                    
INFO     17:19:17.345 │ No auto search option.                                     
INFO     17:19:17.357 │ Click ( 980,  522) @ MAP_PREPARATION                       
INFO     17:19:18.854 │ Using fleet: [1, 2, 0]                                     
INFO     17:19:18.871 │ [Light_orange_line] 4                                      
INFO     17:19:18.883 │ Hard Campaign. No fleet preparation                        
INFO     17:19:18.892 │ Click (1151,  599) @ FLEET_PREPARATION                     
INFO     17:19:26.890 │ Enemy searching appeared.                                  
INFO     17:19:28.200 │ No fleet lock option.                                      
INFO     17:19:28.216 │ <<< MAP INIT >>>                                           
INFO     17:19:28.228 │ Load map_data, has_loop=False, use_loop=False              
INFO     17:19:28.241 │ Load spawn_data, has_loop=False, use_loop=False            
INFO     17:19:28.253 │ grid_connection: wall=False, portal=False                  
INFO     17:19:28.269 │ Load mechanism, land_base=False, maze=False, fortress=False
INFO     17:19:30.005 │           vanish_point: (  645, -1720)                     
INFO     17:19:30.023 │          distant_point: (-2298, -1720)                     
INFO     17:19:30.148 │ 0.480s      Horizontal: 7 (7 inner, 1 edge)                
INFO     17:19:30.165 │ Edges: /_\    Vertical: 9 (10 inner, 2 edge)               
INFO     17:19:30.182 │ [homo_storage] ((8, 6), [(238.327, 117.115), (1150.061,    
         117.115), (114.976, 674.259), (1303.105, 674.259)])                       
INFO     17:19:30.475 │            tile_center: 0.939 (good match)                 
INFO     17:19:30.537 │ 0.335s      edge_lines: 2 hori, 2 vert                     
INFO     17:19:30.555 │ Edges: /_\   homo_loca: ( 25, 127)                         
INFO     17:19:30.595 │            center_loca: (3, 3)                             
INFO     17:19:30.617 │       camera_corrected: A1 -> D5                           
INFO     17:19:30.635 │                 Camera: D5                                 
INFO     17:19:31.233 │ 0.578s         predict: 46                                 
INFO     17:19:31.254 │ -- -- -- -- -- -- -- --                                    
INFO     17:19:31.271 │ -- -- -- -- -- -- -- 3L                                    
INFO     17:19:31.287 │ -- -- -- -- -- 3L -- --                                    
INFO     17:19:31.303 │ -- -- -- -- -- -- -- --                                    
INFO     17:19:31.319 │ -- -- -- 2M -- -- -- --                                    
INFO     17:19:31.337 │ .. -- -- -- -- -- -- ..                                    
INFO     17:19:31.353 │ Fleet set to 1                                             
INFO     17:19:31.401 │ Fleet: 1, fleet_current_index: 1                           
INFO     17:19:31.436 │ [Map_buff] double_line                                     
INFO     17:19:31.471 │ Skip strategy bar check.                                   
INFO     17:19:31.535 │ [HP]  98%  98%  98%  98%  98%  98%                         
INFO     17:19:31.552 │ Ensure edge in sight.                                      
INFO     17:19:31.570 │ Full scan start, mode=normal                               
INFO     17:19:31.584 │ [enemy_missing] EN: 3, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:31.600 │ [enemy_may____] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:31.619 │ Focus to: E5                                               
INFO     17:19:31.632 │ Map swipe: (1, 0)                                          
INFO     17:19:31.653 │ Swipe ( 704,  340) -> ( 506,  269), 0.181                  
INFO     17:19:33.900 │            tile_center: 0.955 (good match)                 
INFO     17:19:33.956 │ 0.290s      edge_lines: 2 hori, 1 vert                     
INFO     17:19:33.974 │ Edges:  _\   homo_loca: ( 22,  53)                         
INFO     17:19:34.010 │           grids_offset: (1, 0)                             
INFO     17:19:34.026 │            center_loca: (3, 3)                             
INFO     17:19:34.127 │ Map swipe predict: None (0.085s, no match)                 
INFO     17:19:34.147 │                 Camera: E5                                 
INFO     17:19:34.160 │                 Camera: E5                                 
INFO     17:19:34.375 │ 0.198s         predict: 42                                 
INFO     17:19:34.390 │ -- -- -- -- -- -- --                                       
INFO     17:19:34.405 │ -- -- -- -- -- -- 3L                                       
INFO     17:19:34.420 │ -- -- -- -- 3L -- --                                       
INFO     17:19:34.436 │ -- -- -- -- -- -- --                                       
INFO     17:19:34.453 │ -- -- 2M -- -- -- --                                       
INFO     17:19:34.470 │ -- -- -- -- -- -- --                                       
INFO     17:19:34.485 │ Map swipe: (0, 0)                                          
INFO     17:19:34.501 │ [enemy_missing] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:34.516 │ [enemy_may____] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:34.533 │ Continue scanning.                                         
INFO     17:19:34.548 │ Focus to: E3                                               
INFO     17:19:34.565 │ Map swipe: (0, -2)                                         
INFO     17:19:34.585 │ Swipe ( 643,  183) -> ( 652,  462), 0.148                  
INFO     17:19:36.414 │            tile_center: 0.883 (22 matches)                 
INFO     17:19:36.442 │ 0.190s  _   edge_lines: 1 hori, 1 vert                     
INFO     17:19:36.455 │ Edges:   \   homo_loca: ( 27,  61)                         
INFO     17:19:36.474 │           grids_offset: (1, 0)                             
INFO     17:19:36.484 │            center_loca: (3, 2)                             
INFO     17:19:36.559 │ Map swipe predict: None (0.064s, no match)                 
INFO     17:19:36.578 │                 Camera: E3                                 
INFO     17:19:36.594 │                 Camera: E3                                 
INFO     17:19:36.828 │ 0.219s         predict: 35                                 
INFO     17:19:36.844 │ -- -- -- -- -- -- --                                       
INFO     17:19:36.857 │ -- -- -- -- -- -- --                                       
INFO     17:19:36.873 │ -- -- -- -- -- -- 3L                                       
INFO     17:19:36.887 │ -- -- -- -- 3L -- --                                       
INFO     17:19:36.899 │ -- -- -- -- -- -- --                                       
INFO     17:19:36.912 │ Map swipe: (0, 0)                                          
INFO     17:19:36.929 │ [enemy_missing] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:36.942 │ [enemy_may____] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:36.959 │ Continue scanning.                                         
INFO     17:19:36.971 │ Focus to: D3                                               
INFO     17:19:36.981 │ Map swipe: (-1, 0)                                         
INFO     17:19:36.998 │ Swipe ( 557,  364) -> ( 757,  361), 0.155                  
INFO     17:19:38.690 │            tile_center: 0.905 (good match)                 
INFO     17:19:38.736 │ 0.218s  _   edge_lines: 1 hori, 2 vert                     
INFO     17:19:38.754 │ Edges: / \   homo_loca: ( 36,  58)                         
INFO     17:19:38.786 │            center_loca: (3, 2)                             
INFO     17:19:38.875 │ Map swipe predict: None (0.070s, no match)                 
INFO     17:19:38.894 │                 Camera: D3                                 
INFO     17:19:38.906 │                 Camera: D3                                 
INFO     17:19:39.091 │ 0.171s         predict: 39                                 
INFO     17:19:39.109 │ -- -- -- -- -- -- -- --                                    
INFO     17:19:39.120 │ Fl -- -- -- -- -- -- --                                    
INFO     17:19:39.135 │ -- -- -- -- -- -- -- 3L                                    
INFO     17:19:39.152 │ -- -- -- -- -- 3L -- --                                    
INFO     17:19:39.166 │ -- -- -- -- -- -- -- ..                                    
INFO     17:19:39.180 │ Map swipe: (0, 0)                                          
INFO     17:19:39.196 │ [enemy_missing] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:39.206 │ [enemy_may____] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:39.222 │ Continue scanning.                                         
INFO     17:19:39.235 │ Focus to: C1                                               
INFO     17:19:39.245 │ Map swipe: (-1, -2)                                        
INFO     17:19:39.268 │ Swipe ( 591,  280) -> ( 779,  555), 0.113                  
INFO     17:19:40.965 │            tile_center: 0.918 (good match)                 
INFO     17:19:40.998 │ 0.152s  _   edge_lines: 1 hori, 1 vert                     
INFO     17:19:41.008 │ Edges: /     homo_loca: ( 32,  59)                         
INFO     17:19:41.024 │            center_loca: (2, 0)                             
INFO     17:19:41.072 │ Map swipe predict: None (0.037s, no match)                 
INFO     17:19:41.086 │                 Camera: C1                                 
INFO     17:19:41.095 │                 Camera: C1                                 
INFO     17:19:41.179 │ 0.075s         predict: 20                                 
INFO     17:19:41.196 │ -- FL -- -- -- -- --                                       
INFO     17:19:41.206 │ Fl -- -- -- -- -- --                                       
INFO     17:19:41.219 │ -- -- -- -- -- -- ..                                       
INFO     17:19:41.230 │ Map swipe: (0, 0)                                          
INFO     17:19:41.244 │ [enemy_missing] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:41.259 │ [enemy_may____] EN: 0, MY: 0, SI: 0, BO: 0, CA: 0          
INFO     17:19:41.271 │     A  B  C  D  E  F  G  H                                 
INFO     17:19:41.285 │  1 ++ FL -- -- -- -- -- --                                 
INFO     17:19:41.298 │  2 Fl -- -- -- -- ++ ++ --                                 
INFO     17:19:41.308 │  3 -- -- -- ++ ++ -- -- 3L                                 
INFO     17:19:41.319 │  4 ++ ++ -- ++ ++ 3L -- --                                 
INFO     17:19:41.332 │  5 -- ++ -- -- -- -- -- ++                                 
INFO     17:19:41.346 │  6 -- -- -- 2M ++ ++ -- --                                 
INFO     17:19:41.357 │  7 -- -- -- -- -- -- -- --                                 
INFO     17:19:41.370 │ Predict fleet_2 to be A2                                   
INFO     17:19:41.382 │ <<< FIND CURRENT FLEET >>>                                 
INFO     17:19:41.395 │ Fleets: [B1, A2]                                           
INFO     17:19:41.406 │ [Fleet_1: B1] Fleet_2: A2                                  
INFO     17:19:41.434 │       A    B    C    D    E    F    G    H                 
INFO     17:19:41.448 │  1 9999    0    1    2    3    4    5    6                 
INFO     17:19:41.462 │  2    2    1    2    3    4 9999 9999    7                 
INFO     17:19:41.474 │  3    3    2    3 9999 9999   12   11    8                 
INFO     17:19:41.489 │  4 9999 9999    4 9999 9999    9   10   11                 
INFO     17:19:41.504 │  5    9 9999    5    6    7    8    9 9999                 
INFO     17:19:41.517 │  6    8    7    6    7 9999 9999   10   11                 
INFO     17:19:41.530 │  7    9    8    7    8    9   10   11   12                 
──────────────────────────────────── BATTLE_0 ─────────────────────────────────────
INFO     17:19:41.546 │ Using function: battle_default                             
INFO     17:19:41.555 │ <<< CLEAR ENEMY >>>                                        
INFO     17:19:41.582 │ Grids: [D6, F4, H3]                                        
INFO     17:19:41.594 │ targetEnemyScale:default_mode                              
INFO     17:19:41.609 │ Clear enemy: D6                                            
INFO     17:19:41.622 │ [Fleet_1: B1] Fleet_2: A2                                  
INFO     17:19:41.636 │ In sight: D6                                               
INFO     17:19:41.650 │ Focus to: C4                                               
INFO     17:19:41.663 │ Map swipe: (0, 3)                                          
INFO     17:19:41.679 │ Swipe ( 986,  601) -> ( 981,  187), 0.115                  
INFO     17:19:43.500 │            tile_center: 0.920 (good match)                 
INFO     17:19:43.528 │ 0.150s  _   edge_lines: 1 hori, 1 vert                     
INFO     17:19:43.537 │ Edges: /     homo_loca: ( 27,  55)                         
INFO     17:19:43.561 │            center_loca: (2, 3)                             
INFO     17:19:43.629 │ Map swipe predict: None (0.058s, no match)                 
INFO     17:19:43.648 │                 Camera: C4                                 
INFO     17:19:43.660 │                 Camera: C4                                 
INFO     17:19:43.896 │ 0.225s         predict: 42                                 
INFO     17:19:43.910 │ -- -- -- -- -- -- -- --                                    
INFO     17:19:43.924 │ -- -- -- -- -- -- -- ..                                    
INFO     17:19:43.937 │ -- -- -- -- -- -- -- ..                                    
INFO     17:19:43.952 │ -- -- -- -- -- 3L -- ..                                    
INFO     17:19:43.967 │ -- -- -- -- -- -- -- ..                                    
INFO     17:19:43.980 │ -- -- -- 2M -- -- .. ..                                    
INFO     17:19:43.992 │ Map swipe: (0, 0)                                          
INFO     17:19:44.004 │ Global D6 (camera=C4) -> Local D6 (center=C4)              
INFO     17:19:44.023 │ Click ( 784,  574) @ D6                                    
INFO     17:19:50.945 │ Combat preparation.                                        
INFO     17:19:50.987 │ [Automation] ON                                            
INFO     17:19:51.044 │ Click (1082,  635) @ BATTLE_PREPARATION                    
INFO     17:19:53.620 │ [Automation] ON                                            
INFO     17:19:53.642 │ Click (1176,  656) @ BATTLE_PREPARATION                    
INFO     17:19:55.804 │ [Loading] 21%                                              
INFO     17:19:55.817 │ Screenshot interval set to 1.0s                            
INFO     17:20:04.405 │ Combat execute                                             
INFO     17:20:09.754 │ Combat auto check timer reached                            
INFO     17:20:38.436 │ Click (1012,  653) @ BATTLE_STATUS_S                       
INFO     17:20:38.521 │ Screenshot interval set to 0.1s                            
INFO     17:20:38.537 │ Combat status ```
LmeSzinc commented 2 years ago

Just as the help text said, H8-1 must be 100% cleared, but it's not according to the log.

INFO     17:09:20.350 │ [Map_info] 0%,                                             

It's the fallback battle logic that was using in H8-4 and fortunately fine, but unfortunately get an error in H8-1.

──────────────────────────────────── BATTLE_0 ─────────────────────────────────────
INFO     17:19:41.546 │ Using function: battle_default  

I can't guarentee Alas will work as expected if you don't follow the instruction.

Josexv1 commented 2 years ago

Thanks, I'll close the issue.