Skip to content

勋章商店购买改造图纸时报错 #5068

@Ashe428

Description

@Ashe428

在提问之前...

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

描述你的问题

勋章商店购买改造图纸时报错。经测试,T1、T2以及T3都会报错。

如何复现

正常启用其他商店功能,在勋章商店购买图纸

预期行为

No response

相关 Logs

──────────────────────────────────── SHOP BUY ─────────────────────────────────────
INFO     09:09:45.941 │ SHOP BUY                                                   
INFO     09:09:46.058 │ [Price_ocr 0.107s] [10, 6, 100, 60, 30, 30, 30, 30, 30, 30]
INFO     09:09:46.060 │ [Item detected] 10                                         
INFO     09:09:46.362 │ [Price_ocr 0.119s] [10, 6, 100, 60, 30, 30, 30, 30, 30, 30]
INFO     09:09:46.364 │ [Item detected] 10                                         
INFO     09:09:46.366 │ Shop row 1: ['FoodT6_x1_Medal_x10', 'FoodT5_x1_Medal_x6',  
         'RetrofitT3_x1_Medal_x100', 'RetrofitT2_x1_Medal_x60',                    
         'RetrofitT1_x1_Medal_x30']                                                
INFO     09:09:46.367 │ Shop row 2: ['PlateWildT3_x1_Medal_x30',                   
         'PlateGunT3_x1_Medal_x30', 'PlateTorpedoT3_x1_Medal_x30',                 
         'PlateAntiAirT3_x1_Medal_x30', 'PlatePlaneT3_x1_Medal_x30']               
INFO     09:09:46.389 │ [SHOP_OCR_BALANCE 0.021s] 1761                             
INFO     09:09:46.392 │ Medal: 1761                                                
WARNING  09:09:46.393 │ Invalid filter: "#plategeneralt3". This selector does not  
         match the regex, nor a preset.                                            
WARNING  09:09:46.394 │ Invalid filter: "#platewildt3". This selector does not     
         match the regex, nor a preset.                                            
INFO     09:09:46.395 │ [Item_sort] RetrofitT3_x1_Medal_x100 > FoodT6_x1_Medal_x10 
         > FoodT5_x1_Medal_x6                                                      
INFO     09:09:46.397 │ Click ( 565,  274) @ RetrofitT3_x1_Medal_x100              
CRITICAL 09:09:46.843 │ No configuration with name 'MedalShop_RETROFIT_T3'         
ERROR    09:09:46.845 │ AttributeError: 'AzurLaneConfig' object has no attribute   
         'MedalShop_RETROFIT_T3'                                                   
         ╭────────────────── Traceback (most recent call last) ───────────────────╮
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\alas.py:69 in run            │
         │                                                                        │
         │    67 │   │   │   if not skip_first_screenshot:                        │
         │    68 │   │   │   │   self.device.screenshot()                         │
         │ ❱  69 │   │   │   self.__getattribute__(command)()                     │
         │    70 │   │   │   return True                                          │
         │    71 │   │   except TaskEnd:                                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │               command = 'shop_once'                                │ │
         │ │                     e = AttributeError("'AzurLaneConfig' object    │ │
         │ │                         has no attribute 'MedalShop_RETROFIT_T3'") │ │
         │ │                  self = <alas.AzurLaneAutoScript object at         │ │
         │ │                         0x000001F33DCDC048>                        │ │
         │ │ skip_first_screenshot = False                                      │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\alas.py:222 in shop_once     │
         │                                                                        │
         │   220 │   def shop_once(self):                                         │
         │   221 │   │   from module.shop.shop_reward import RewardShop           │
         │ ❱ 222 │   │   RewardShop(config=self.config, device=self.device).run_o │
         │   223 │                                                                │
         │   224 │   def shipyard(self):                                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ RewardShop = <class 'module.shop.shop_reward.RewardShop'>          │ │
         │ │       self = <alas.AzurLaneAutoScript object at                    │ │
         │ │              0x000001F33DCDC048>                                   │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\shop_reward.py:6 │
         │ 9 in run_once                                                          │
         │                                                                        │
         │   67 │   │   │   self.shop_tab_250814.set(main=self, upper=2)          │
         │   68 │   │   │   self.monthly_shop_nav_250814.set(main=self, left=3)   │
         │ ❱ 69 │   │   │   MedalShop_250814(self.config, self.device).run()      │
         │   70 │   │                                                             │
         │   71 │   │   self.config.task_delay(server_update=True)                │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ self = <module.shop.shop_reward.RewardShop object at               │ │
         │ │        0x000001F31E479AC8>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\shop_medal.py:37 │
         │ 3 in run                                                               │
         │                                                                        │
         │   371 │   │   time.sleep(0.5)                                          │
         │   372 │   │   while 1:                                                 │
         │ ❱ 373 │   │   │   self.shop_buy()                                      │
         │   374 │   │   │   if MEDAL_SHOP_SCROLL_250814.at_bottom(main=self):    │
         │   375 │   │   │   │   logger.info('Medal shop reach bottom, stop')     │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ self = <module.shop.shop_medal.MedalShop_250814 object at          │ │
         │ │        0x000001F3921AA5C8>                                         │ │
         │ │ time = <module 'time' (built-in)>                                  │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\clerk.py:344 in  │
         │ shop_buy                                                               │
         │                                                                        │
         │   342 │   │   │   │   return True                                      │
         │   343 │   │   │   else:                                                │
         │ ❱ 344 │   │   │   │   self.shop_buy_execute(item)                      │
         │   345 │   │   │   │   continue                                         │
         │   346                                                                  │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │     _ = 4                                                          │ │
         │ │  item = <module.shop.base.ShopItem_250814 object at                │ │
         │ │         0x000001F393D0E9C8>                                        │ │
         │ │ items = [                                                          │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D0ED88>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D02F88>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D0E9C8>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D0E848>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D0E788>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D0EE88>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D0EFC8>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393C92408>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393C92908>,                                       │ │
         │ │         │   <module.shop.base.ShopItem_250814 object at            │ │
         │ │         0x000001F393D0EB88>                                        │ │
         │ │         ]                                                          │ │
         │ │  self = <module.shop.shop_medal.MedalShop_250814 object at         │ │
         │ │         0x000001F3921AA5C8>                                        │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\clerk.py:305 in  │
         │ shop_buy_execute                                                       │
         │                                                                        │
         │   303 │   │   │   │   self.interval_reset(SHOP_BACK_ARROW)             │
         │   304 │   │   │   │   continue                                         │
         │ ❱ 305 │   │   │   if self.shop_buy_handle(item):                       │
         │   306 │   │   │   │   self.interval_reset(SHOP_BACK_ARROW)             │
         │   307 │   │   │   │   continue                                         │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │                  item = <module.shop.base.ShopItem_250814 object   │ │
         │ │                         at 0x000001F393D0E9C8>                     │ │
         │ │                  self = <module.shop.shop_medal.MedalShop_250814   │ │
         │ │                         object at 0x000001F3921AA5C8>              │ │
         │ │ skip_first_screenshot = False                                      │ │
         │ │               success = False                                      │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\shop_medal.py:24 │
         │ 7 in shop_buy_handle                                                   │
         │                                                                        │
         │   245 │   │   """                                                      │
         │   246 │   │   if self.appear(SHOP_BUY_CONFIRM_SELECT, offset=(20, 20), │
         │ ❱ 247 │   │   │   self.shop_buy_select_execute(item)                   │
         │   248 │   │   │   self.interval_reset(SHOP_BUY_CONFIRM_SELECT)         │
         │   249 │   │   │   return True                                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ item = <module.shop.base.ShopItem_250814 object at                 │ │
         │ │        0x000001F393D0E9C8>                                         │ │
         │ │ self = <module.shop.shop_medal.MedalShop_250814 object at          │ │
         │ │        0x000001F3921AA5C8>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\clerk.py:143 in  │
         │ shop_buy_select_execute                                                │
         │                                                                        │
         │   141 │   │   """                                                      │
         │   142 │   │   # Search for appropriate select grid button for item     │
         │ ❱ 143 │   │   select = self.shop_get_select(item)                      │
         │   144 │   │                                                            │
         │   145 │   │   # Get displayed stock limit; varies between shops        │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ item = <module.shop.base.ShopItem_250814 object at                 │ │
         │ │        0x000001F393D0E9C8>                                         │ │
         │ │ self = <module.shop.shop_medal.MedalShop_250814 object at          │ │
         │ │        0x000001F3921AA5C8>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\clerk.py:116 in  │
         │ shop_get_select                                                        │
         │                                                                        │
         │   114 │   │                                                            │
         │   115 │   │   # Get configured choice for item                         │
         │ ❱ 116 │   │   choice = self.shop_get_choice(item)                      │
         │   117 │   │                                                            │
         │   118 │   │   # Get appropriate select button for click                │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ group = 'retrofit'                                                 │ │
         │ │  item = <module.shop.base.ShopItem_250814 object at                │ │
         │ │         0x000001F393D0E9C8>                                        │ │
         │ │  self = <module.shop.shop_medal.MedalShop_250814 object at         │ │
         │ │         0x000001F3921AA5C8>                                        │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ C:\Users\Monix\Desktop\AzurLaneAutoScript\module\shop\clerk.py:88 in   │
         │ shop_get_choice                                                        │
         │                                                                        │
         │    86 │   │   class_name = self.__class__.__name__.split("_")[0]       │
         │    87 │   │   try:                                                     │
         │ ❱  88 │   │   │   return getattr(self.config, f'{class_name}_{ugroup}{ │
         │    89 │   │   except Exception:                                        │
         │    90 │   │   │   logger.critical(f'No configuration with name '       │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ class_name = 'MedalShop'                                           │ │
         │ │      group = 'retrofit'                                            │ │
         │ │       item = <module.shop.base.ShopItem_250814 object at           │ │
         │ │              0x000001F393D0E9C8>                                   │ │
         │ │    postfix = '_T3'                                                 │ │
         │ │       self = <module.shop.shop_medal.MedalShop_250814 object at    │ │
         │ │              0x000001F3921AA5C8>                                   │ │
         │ │     ugroup = 'RETROFIT'                                            │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         ╰────────────────────────────────────────────────────────────────────────╯
         AttributeError: 'AzurLaneConfig' object has no attribute                  
         'MedalShop_RETROFIT_T3'                                                   
WARNING  09:09:47.039 │ Saving error: ./log/error/1756127387039

截图

Image

还有别的吗?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions