OnmyojiAutoScript icon indicating copy to clipboard operation
OnmyojiAutoScript copied to clipboard

结界挂卡不放卡直接报错

Open Huafeibshf opened this issue 1 year ago • 2 comments

在提问之前...

  • [X] 我已经搜索了现有的 issues
  • [X] 我在提问题之前至少花费了 5 分钟来思考和准备
  • [X] 我已经阅读了文档中的 常见问题(FAQ)
  • [X] 这个问题出现了至少三次,不是偶发的
  • [ ] 我使用 OAS 的 dev 分支

描述你的问题

进到结界卡页面不会选卡挂卡,会报错不动

如何复现

  1. 前往 '结界'
  2. 点击 '结界卡'
  3. 出现问题

预期行为

No response

相关 Logs

════════════════════════════════════════════════════════════════════════════════
─────────────────────────────── KEKKAIACTIVATION ───────────────────────────────
════════════════════════════════════════════════════════════════════════════════
2024-08-10 00:05:03.901 |          nemu_ipc.py:0212 |     INFO | NemuIpcImpl init, nemu_folder=E:\program files\Netease\MuMu Player 12, ipc_dll=E:\program      
files\Netease\MuMu Player 12\shell\sdk\external_renderer_ipc.dll, instance_id=2, display_id=0                                                                   
2024-08-10 00:05:04.083 |            logger.py:0284 |     INFO | [Screen_size] 1280x720                                                                         
2024-08-10 00:05:04.107 |            script.py:0350 |     INFO | module_path:                                                                                   
E:\MODS\Onmyoji\OnmyojiAutoScript-easy-install\tasks\KekkaiActivation\script_task.py, module_name: script_task                                                  
2024-08-10 00:05:04.485 |           game_ui.py:0096 |     INFO | UI get current page                                                                            
2024-08-10 00:05:04.494 |            logger.py:0284 |     INFO | [UI] page_main                                                                                 
2024-08-10 00:05:04.500 |            logger.py:0276 |     INFO | <<< UI GOTO PAGE_GUILD >>>                                                                     
2024-08-10 00:05:04.513 |           game_ui.py:0244 |     INFO | Page switch: page_main -> page_guild                                                           
2024-08-10 00:05:04.521 |           control.py:0074 |     INFO | Click ( 557,  656) @ PAGE_MAIN_GOTO_GUILD                                                      
2024-08-10 00:05:04.524 |            logger.py:0276 |     INFO | <<< MINITOUCH INIT >>>                                                                         
2024-08-10 00:05:04.585 |            logger.py:0284 |     INFO | [Device Orientation] 1 (HOME key on the right)                                                 
2024-08-10 00:05:04.621 |        connection.py:0440 |     INFO | Reuse forward: ForwardItem(serial='127.0.0.1:16448', local='tcp:20716',                        
remote='localabstract:minitouch')                                                                                                                               
2024-08-10 00:05:04.675 |         minitouch.py:0401 |     INFO | v 1                                                                                            
2024-08-10 00:05:04.722 |         minitouch.py:0405 |     INFO | ^ 10 720 1280 0                                                                                
2024-08-10 00:05:04.775 |         minitouch.py:0428 |     INFO | $ 6809                                                                                         
2024-08-10 00:05:04.826 |         minitouch.py:0432 |     INFO | minitouch running on port: 20716, pid: 6809                                                    
2024-08-10 00:05:05.438 |         minitouch.py:0435 |     INFO | max_contact: 10; max_x: 720; max_y: 1280; max_pressure: 0                                      
2024-08-10 00:05:05.546 |             image.py:0076 |     INFO | roi_front size changed to 66x75                                                                
2024-08-10 00:05:09.019 |           game_ui.py:0221 |     INFO | Page arrive: page_guild                                                                        
2024-08-10 00:05:09.333 |           control.py:0074 |     INFO | Click (1070,  625) @ KU_GUILD_REALM                                                            
2024-08-10 00:05:10.554 |           control.py:0074 |     INFO | Click (1084,  678) @ KU_GUILD_REALM                                                            
2024-08-10 00:05:10.963 |          nemu_ipc.py:0176 |  WARNING | Func screenshot() call timeout, retrying: 0                                                    
2024-08-10 00:05:13.234 |           control.py:0074 |     INFO | Click ( 619,  297) @ REALM_SHI_GROWN                                                           
2024-08-10 00:05:13.542 |       script_task.py:0256 |     INFO | Enter shikigami grown                                                                          
2024-08-10 00:05:13.553 |       script_task.py:0353 |     INFO | No max level shikigami                                                                         
2024-08-10 00:05:14.147 |           control.py:0074 |     INFO | Click (  65,   50) @ UI_UI_BACK_BLUE                                                           
2024-08-10 00:05:15.354 |           control.py:0074 |     INFO | Click ( 890,  292) @ REALM_SHI_CARD                                                            
2024-08-10 00:05:15.953 |       script_task.py:0159 |     INFO | Enter card page                                                                                
2024-08-10 00:05:15.957 |            logger.py:0276 |     INFO | <<< START ACTIVATION >>>                                                                       
2024-08-10 00:05:16.488 |       script_task.py:0137 |     INFO | Card is not selected also not using                                                            
2024-08-10 00:05:16.492 |            logger.py:0318 |    ERROR | IndexError: list index out of range                                                            
╭───────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────╮
│ E:\MODS\Onmyoji\OnmyojiAutoScript-easy-install\script.py:352 in run                                                                                          │
│                                                                                                                                                              │
│   349 │   │   │   module_path = str(Path.cwd() / 'tasks' / command / (module_name+'.py'))                                                                    │
│   350 │   │   │   logger.info(f'module_path: {module_path}, module_name: {module_name}')                                                                     │
│   351 │   │   │   task_module = load_module(module_name, module_path)                                                                                        │
│ ❱ 352 │   │   │   task_module.ScriptTask(config=self.config, device=self.device).run()                                                                       │
│   353 │   │   except TaskEnd:                                                                                                                                │
│   354 │   │   │   return True                                                                                                                                │
│   355 │   │   except GameNotRunningError as e:                                                                                                               │
│                                                                                                                                                              │
│ ╭──────────────────────────────────────────────────────────────── locals ────────────────────────────────────────────────────────────────╮                   │
│ │     command = 'KekkaiActivation'                                                                                                       │                   │
│ │           e = IndexError('list index out of range')                                                                                    │                   │
│ │ module_name = 'script_task'                                                                                                            │                   │
│ │ module_path = 'E:\\MODS\\Onmyoji\\OnmyojiAutoScript-easy-install\\tasks\\KekkaiActivation\\script_tas'+4                               │                   │
│ │        self = <script.Script object at 0x000001D09B72B7F0>                                                                             │                   │
│ │ task_module = <module 'script_task' from 'E:\\MODS\\Onmyoji\\OnmyojiAutoScript-easy-install\\tasks\\KekkaiActivation\\script_task.py'> │                   │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                   │
│                                                                                                                                                              │
│ E:\MODS\Onmyoji\OnmyojiAutoScript-easy-install\tasks\KekkaiActivation\script_task.py:36 in run                                                               │
│                                                                                                                                                              │
│    33 │   │   │   self.check_max_lv(con.shikigami_class)                                                                                                     │
│    34 │   │   self.harvest_card()                                                                                                                            │
│    35 │   │                                                                                                                                                  │
│ ❱  36 │   │   self.run_activation(con)                                                                                                                       │
│    37 │   │   while 1:                                                                                                                                       │
│    38 │   │   │   # 关闭到结界界面                                                                                                                           │
│    39 │   │   │   self.screenshot()                                                                                                                          │
│                                                                                                                                                              │
│ ╭────────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────────╮                              │
│ │  con = ActivationConfig(card_rule='fish', exchange_before=True, exchange_max=True, shikigami_class=<ShikigamiClass.N: 'N'>) │                              │
│ │ self = <script_task.ScriptTask object at 0x000001D0B4CBE620>                                                                │                              │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                              │
│                                                                                                                                                              │
│ E:\MODS\Onmyoji\OnmyojiAutoScript-easy-install\tasks\KekkaiActivation\script_task.py:138 in run_activation                                                   │
│                                                                                                                                                              │
│   135 │   │   │   # 如果是什么都没有,那就是可以开始挂卡了                                                                                                   │
│   136 │   │   │   if not card_status and not card_effect:                                                                                                    │
│   137 │   │   │   │   logger.info('Card is not selected also not using')                                                                                     │
│ ❱ 138 │   │   │   │   self.screening_card(_config.card_rule)                                                                                                 │
│   139                                                                                                                                                        │
│   140                                                                                                                                                        │
│   141                                                                                                                                                        │
│                                                                                                                                                              │
│ ╭────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────╮                       │
│ │     _config = ActivationConfig(card_rule='fish', exchange_before=True, exchange_max=True, shikigami_class=<ShikigamiClass.N: 'N'>) │                       │
│ │ card_effect = False                                                                                                                │                       │
│ │ card_status = False                                                                                                                │                       │
│ │        self = <script_task.ScriptTask object at 0x000001D0B4CBE620>                                                                │                       │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                       │
│                                                                                                                                                              │
│ E:\MODS\Onmyoji\OnmyojiAutoScript-easy-install\tasks\KekkaiActivation\script_task.py:228 in screening_card                                                   │
│                                                                                                                                                              │
│   225 │   │                                                                                                                                                  │
│   226 │   │   card_class = None                                                                                                                              │
│   227 │   │   target_class = None                                                                                                                            │
│ ❱ 228 │   │   top_card = self.order_cards[0]                                                                                                                 │
│   229 │   │   if top_card.startswith(CardClass.TAIKO):  # 太鼓                                                                                               │
│   230 │   │   │   card_class = CardClass.TAIKO                                                                                                               │
│   231 │   │   │   target_class = self.I_A_CARD_KAIKO                                                                                                         │
│                                                                                                                                                              │
│ ╭────────────────────────────────────────── locals ───────────────────────────────────────────╮                                                              │
│ │   card_class = None                                                                         │                                                              │
│ │         rule = 'fish'                                                                       │                                                              │
│ │     run_auto = <function ScriptTask.screening_card.<locals>.run_auto at 0x000001D0B4CC5240> │                                                              │
│ │         self = <script_task.ScriptTask object at 0x000001D0B4CBE620>                        │                                                              │
│ │ target_class = None                                                                         │                                                              │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range                                                                                                                             
2024-08-10 00:05:16.928 |            script.py:0096 |  WARNING | Saving error: ./log/error/1723219516928

截图

2024-08-10_00-05-16-478327

还有别的吗?

No response

Huafeibshf avatar Aug 10 '24 02:08 Huafeibshf

fish

runhey avatar Aug 12 '24 08:08 runhey

配置不是这么填的,看一下文档 https://runhey.github.io/OnmyojiAutoScript-website/docs/user-manual/task-list

runhey avatar Aug 12 '24 08:08 runhey

配置不是这么填的,看一下文档 https://runhey.github.io/OnmyojiAutoScript-website/docs/user-manual/task-list

重新试了一下搞懂了,写单独的”斗鱼“两个字也不行,得带上数字排序队列才能正常运行,这下已经弄好了,谢谢佬(这样说来文档或许有一点歧义?)

Huafeibshf avatar Aug 17 '24 09:08 Huafeibshf

文档就明明白白给你说有数字了,而且还带有例子,哪儿来的歧义

runhey avatar Aug 18 '24 10:08 runhey

文档就明明白白给你说有数字了,而且还带有例子,哪儿来的歧义

这个文案只强调了类型不能混编并且可以选择自定义顺序吧,没强调单类型必须要写顺序带数字才能正常运行,并且文档也说了auto就是默认高星的过滤,给人第一反应就是写三个单类型结界卡也是按默认高星的过滤方式,这个逻辑我个人感觉应该没问题的

Huafeibshf avatar Aug 20 '24 05:08 Huafeibshf

那既然你认为有问题,你来修改一下文档

runhey avatar Aug 20 '24 05:08 runhey

文档就明明白白给你说有数字了,而且还带有例子,哪儿来的歧义

并且写了挂卡自定义同寄养规则,寄养规则就是写一个单类别就可以运行,不用具体到带数字的顺序()

Huafeibshf avatar Aug 20 '24 06:08 Huafeibshf