Skip to content

八岐大蛇任务切换御魂报错 #106

@JustForRain

Description

@JustForRain

在提问之前...

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

描述你的问题

八岐大蛇任务切换御魂报错

如何复现

  1. 前往 '...'
  2. 点击 '....'
  3. 滑动到 '....'
  4. 出现问题

预期行为

正常切换御魂

相关 Logs

════════════════════════════════════════════════════════════════════════════════
──────────────────────────────────── OROCHI ────────────────────────────────────
════════════════════════════════════════════════════════════════════════════════
2026-05-21 10:53:00.706 |      config_model.py:0178 |     INFO | auto save config                                                                               
2026-05-21 10:53:00.728 |          nemu_ipc.py:0235 |     INFO | NemuIpcImpl init, nemu_folder=C:\Program Files\Netease\MuMu, ipc_dll=C:\Program                
Files\Netease\MuMu\nx_device\12.0\shell\sdk\external_renderer_ipc.dll, instance_id=0, display_id=0                                                              
2026-05-21 10:53:00.787 |            logger.py:0320 |     INFO | [Screen_size] 1280x720                                                                         
2026-05-21 10:53:00.791 |            script.py:0390 |     INFO | module_path: D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\tasks\Orochi\script_task.py,  
module_name: script_task                                                                                                                                        
2026-05-21 10:53:00.839 |            logger.py:0312 |     INFO | <<< UI GOTO PAGE_SHIKIGAMI_RECORDS >>>                                                         
2026-05-21 10:53:01.047 |            logger.py:0320 |     INFO | [UI] page_shikigami_records                                                                    
2026-05-21 10:53:01.648 |            logger.py:0320 |     INFO | [0.8s] Page arrived page_shikigami_records                                                     
2026-05-21 10:53:01.950 |       switch_soul.py:0057 |     INFO | Click preset in switch soul                                                                    
2026-05-21 10:53:02.423 |            logger.py:0320 |     INFO | [SS_GROUP_NAME 0.172s] ['日常', '御魂', '斗技', '逢魔', '寮活动', '道馆/突破', '真蛇']         
2026-05-21 10:53:02.432 |            logger.py:0312 |     INFO | <<< MINITOUCH INIT >>>                                                                         
2026-05-21 10:53:02.451 |            logger.py:0320 |     INFO | [Device Orientation] 1 (HOME key on the right)                                                 
2026-05-21 10:53:02.457 |        connection.py:0440 |     INFO | Reuse forward: ForwardItem(serial='127.0.0.1:16384', local='tcp:20911',                        
remote='localabstract:minitouch')                                                                                                                               
2026-05-21 10:53:02.471 |         minitouch.py:0448 |     INFO | v 1                                                                                            
2026-05-21 10:53:02.475 |         minitouch.py:0452 |     INFO | ^ 10 720 1280 0                                                                                
2026-05-21 10:53:02.478 |         minitouch.py:0475 |     INFO | $ 7640                                                                                         
2026-05-21 10:53:02.483 |         minitouch.py:0479 |     INFO | minitouch running on port: 20911, pid: 7640                                                    
2026-05-21 10:53:02.488 |         minitouch.py:0482 |     INFO | max_contact: 10; max_x: 720; max_y: 1280; max_pressure: 0                                      
2026-05-21 10:53:02.713 |           control.py:0167 |     INFO | [0.28s] Swipe (1228,  200) -> (1225,  329)                                                     
2026-05-21 10:53:03.415 |            logger.py:0320 |     INFO | [SS_GROUP_NAME 0.177s] ['日常', '御魂', '斗技', '逢魔', '寮活动', '道馆/突破', '真蛇']         
2026-05-21 10:53:03.476 |           control.py:0073 |     INFO | [0.05s] Click (1088,  193) @ sou_group_2                                                       
2026-05-21 10:53:04.032 |           control.py:0073 |     INFO | [0.05s] Click (1198,  173) @ sou_group_2                                                       
2026-05-21 10:53:05.417 |           control.py:0073 |     INFO | [0.05s] Click ( 996,  159) @ SS_SOU_SWITCH_1                                                   
2026-05-21 10:53:06.246 |       switch_soul.py:0134 |  WARNING | Click team 1 failed in group 2                                                                 
2026-05-21 10:53:07.084 |       switch_soul.py:0134 |  WARNING | Click team 1 failed in group 2                                                                 
2026-05-21 10:53:07.371 |       switch_soul.py:0137 |     INFO | Switch soul_one group 2 team 1                                                                 
2026-05-21 10:53:07.377 |            logger.py:0312 |     INFO | <<< UI GOTO PAGE_SHIKIGAMI_RECORDS >>>                                                         
2026-05-21 10:53:08.280 |            logger.py:0320 |     INFO | [0.9s] Page arrived page_shikigami_records                                                     
2026-05-21 10:53:08.581 |       switch_soul.py:0057 |     INFO | Click preset in switch soul                                                                    
2026-05-21 10:53:09.050 |            logger.py:0320 |     INFO | [SS_GROUP_NAME 0.175s] ['日常', '御魂', '斗技', '逢魔', '寮活动', '道馆/突破', '真蛇']         
2026-05-21 10:53:09.288 |           control.py:0167 |     INFO | [0.23s] Swipe (1211,  191) -> (1200,  337)                                                     
2026-05-21 10:53:10.012 |            logger.py:0320 |     INFO | [SS_GROUP_NAME 0.199s] ['日常', '御魂', '斗技', '逢魔', '寮活动', '道馆/突破', '真蛇']         
2026-05-21 10:53:10.017 |            logger.py:0354 |    ERROR | ValueError: Switch soul_one group must be in [1-7]                                             
╭───────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────╮
│ D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\script.py:392 in run                                                                                     │
│                                                                                                                                                              │
│   389 │   │   │   module_path = str(Path.cwd() / 'tasks' / command / (module_name + '.py'))                                                                  │
│   390 │   │   │   logger.info(f'module_path: {module_path}, module_name: {module_name}')                                                                     │
│   391 │   │   │   task_module = load_module(module_name, module_path)                                                                                        │
│ ❱ 392 │   │   │   task_module.ScriptTask(config=self.config, device=self.device).run()                                                                       │
│   393 │   │   except Exception as e:                                                                                                                         │
│   394 │   │   │   return self._handle_task_exception(e, command)                                                                                             │
│   395 │   │   return False                                                                                                                                   │
│                                                                                                                                                              │
│ ╭────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────╮                       │
│ │     command = 'Orochi'                                                                                                             │                       │
│ │           e = ValueError('Switch soul_one group must be in [1-7]')                                                                 │                       │
│ │ module_name = 'script_task'                                                                                                        │                       │
│ │ module_path = 'D:\\GreenApps\\yys\\oas\\OnmyojiAutoScript-easy-install\\tasks\\Orochi\\script_task.py'                             │                       │
│ │        self = <script.Script object at 0x0000020F03415270>                                                                         │                       │
│ │ task_module = <module 'script_task' from 'D:\\GreenApps\\yys\\oas\\OnmyojiAutoScript-easy-install\\tasks\\Orochi\\script_task.py'> │                       │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                       │
│                                                                                                                                                              │
│ D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\tasks\Orochi\script_task.py:37 in run                                                                    │
│                                                                                                                                                              │
│    34 │   │   return any_of(self.I_GI_EMOJI_1, self.I_GI_EMOJI_2, self.I_CHECK_EXPLORATION)                                                                  │
│    35 │                                                                                                                                                      │
│    36 │   def run(self) -> bool:                                                                                                                             │
│ ❱  37 │   │   self.switch_orochi_souls()                                                                                                                     │
│    38 │   │                                                                                                                                                  │
│    39 │   │   limit_count = self.config.orochi.orochi_config.limit_count                                                                                     │
│    40 │   │   limit_time = self.config.orochi.orochi_config.limit_time                                                                                       │
│                                                                                                                                                              │
│ ╭─────────────────────────── locals ───────────────────────────╮                                                                                             │
│ │ self = <script_task.ScriptTask object at 0x0000020F05CAC9A0> │                                                                                             │
│ ╰──────────────────────────────────────────────────────────────╯                                                                                             │
│                                                                                                                                                              │
│ D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\tasks\Orochi\script_task.py:87 in switch_orochi_souls                                                    │
│                                                                                                                                                              │
│    84 │   │   │   self.run_switch_soul_by_name(self.config.orochi.switch_soul.group_name,                                                                    │
│    85 │   │   │   │   │   │   │   │   │   │    self.config.orochi.switch_soul.team_name)                                                                     │
│    86 │   │   # 根据选层切换御魂                                                                                                                             │
│ ❱  87 │   │   self.orochi_switch_soul()                                                                                                                      │
│    88 │                                                                                                                                                      │
│    89 │   def check_layer(self, layer: str) -> bool:                                                                                                         │
│    90 │   │   """                                                                                                                                            │
│                                                                                                                                                              │
│ ╭─────────────────────────── locals ───────────────────────────╮                                                                                             │
│ │ self = <script_task.ScriptTask object at 0x0000020F05CAC9A0> │                                                                                             │
│ ╰──────────────────────────────────────────────────────────────╯                                                                                             │
│                                                                                                                                                              │
│ D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\tasks\Orochi\script_task.py:390 in orochi_switch_soul                                                    │
│                                                                                                                                                              │
│   387 │   │   │   case Layer.THIRTEEN:                                                                                                                       │
│   388 │   │   │   │   group_team = orochi_switch_soul.thirteen_switch                                                                                        │
│   389 │   │   self.goto_page(page_shikigami_records)                                                                                                         │
│ ❱ 390 │   │   self.run_switch_soul(group_team)                                                                                                               │
│   391                                                                                                                                                        │
│   392                                                                                                                                                        │
│   393 if __name__ == '__main__':                                                                                                                             │
│                                                                                                                                                              │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮                                                                               │
│ │         group_team = '-1,-1'                                               │                                                                               │
│ │              layer = <Layer.TEN: '拾层'>                                   │                                                                               │
│ │ orochi_switch_soul = SwitchSoulConfig(                                     │                                                                               │
│ │                      │   enable=True,                                      │                                                                               │
│ │                      │   switch_group_team='2,1',                          │                                                                               │
│ │                      │   enable_switch_by_name=False,                      │                                                                               │
│ │                      │   group_name='',                                    │                                                                               │
│ │                      │   team_name='',                                     │                                                                               │
│ │                      │   auto_switch_soul=True,                            │                                                                               │
│ │                      │   ten_switch='-1,-1',                               │                                                                               │
│ │                      │   eleven_switch='2,2',                              │                                                                               │
│ │                      │   twelve_switch='2,1',                              │                                                                               │
│ │                      │   thirteen_switch='-1,-1'                           │                                                                               │
│ │                      )                                                     │                                                                               │
│ │               self = <script_task.ScriptTask object at 0x0000020F05CAC9A0> │                                                                               │
│ ╰────────────────────────────────────────────────────────────────────────────╯                                                                               │
│                                                                                                                                                              │
│ D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\tasks\Component\SwitchSoul\switch_soul.py:36 in run_switch_soul                                          │
│                                                                                                                                                              │
│    33 │   │   │   │   logger.error('Switch soul config error')                                                                                               │
│    34 │   │   │   │   return                                                                                                                                 │
│    35 │   │   self.click_preset()                                                                                                                            │
│ ❱  36 │   │   self.switch_souls(target)                                                                                                                      │
│    37 │                                                                                                                                                      │
│    38 │   def click_preset(self) -> None:                                                                                                                    │
│    39 │   │   """                                                                                                                                            │
│                                                                                                                                                              │
│ ╭──────────────────────────── locals ────────────────────────────╮                                                                                           │
│ │   self = <script_task.ScriptTask object at 0x0000020F05CAC9A0> │                                                                                           │
│ │ target = (-1, -1)                                              │                                                                                           │
│ ╰────────────────────────────────────────────────────────────────╯                                                                                           │
│                                                                                                                                                              │
│ D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\tasks\Component\SwitchSoul\switch_soul.py:150 in switch_souls                                            │
│                                                                                                                                                              │
│   147 │   │   for group, team in target:                                                                                                                     │
│   148 │   │   │   group = int(group)                                                                                                                         │
│   149 │   │   │   team = int(team)                                                                                                                           │
│ ❱ 150 │   │   │   self.switch_soul_one(group, team)                                                                                                          │
│   151 │                                                                                                                                                      │
│   152 │   def exit_shikigami_records(self) -> None:                                                                                                          │
│   153 │   │   """                                                                                                                                            │
│                                                                                                                                                              │
│ ╭──────────────────────────── locals ────────────────────────────╮                                                                                           │
│ │  group = -1                                                    │                                                                                           │
│ │   self = <script_task.ScriptTask object at 0x0000020F05CAC9A0> │                                                                                           │
│ │ target = [(-1, -1)]                                            │                                                                                           │
│ │   team = -1                                                    │                                                                                           │
│ ╰────────────────────────────────────────────────────────────────╯                                                                                           │
│                                                                                                                                                              │
│ D:\GreenApps\yys\oas\OnmyojiAutoScript-easy-install\tasks\Component\SwitchSoul\switch_soul.py:104 in switch_soul_one                                         │
│                                                                                                                                                              │
│   101 │   │   │   sleep(0.5)                                                                                                                                 │
│   102 │   │                                                                                                                                                  │
│   103 │   │   if group < 1 or group > 7:                                                                                                                     │
│ ❱ 104 │   │   │   raise ValueError('Switch soul_one group must be in [1-7]')                                                                                 │
│   105 │   │   if team < 1 or team > 4:                                                                                                                       │
│   106 │   │   │   raise ValueError('Switch soul_one team must be in [1-4]')                                                                                  │
│   107 │   │   # 这一步是选择组                                                                                                                               │
│                                                                                                                                                              │
│ ╭───────────────────────────────────────────────── locals ─────────────────────────────────────────────────╮                                                 │
│ │         compare1 = [                                                                                     │                                                 │
│ │                    │   BoxedResult[日常, 0.9808428287506104],                                            │                                                 │
│ │                    │   BoxedResult[御魂, 0.9993547201156616],                                            │                                                 │
│ │                    │   BoxedResult[斗技, 0.9980277419090271],                                            │                                                 │
│ │                    │   BoxedResult[逢魔, 0.9670622944831848],                                            │                                                 │
│ │                    │   BoxedResult[寮活动, 0.9724409580230713],                                          │                                                 │
│ │                    │   BoxedResult[道馆/突破, 0.9825574159622192],                                       │                                                 │
│ │                    │   BoxedResult[真蛇, 0.9982938766479492]                                             │                                                 │
│ │                    ]                                                                                     │                                                 │
│ │         cur_text = "['日常', '御魂', '斗技', '逢魔', '寮活动', '道馆/突破', '真蛇']"                     │                                                 │
│ │ get_group_assets = <function SwitchSoul.switch_soul_one.<locals>.get_group_assets at 0x0000020F05CA1900> │                                                 │
│ │   get_team_asset = <function SwitchSoul.switch_soul_one.<locals>.get_team_asset at 0x0000020F05BBBBE0>   │                                                 │
│ │            group = -1                                                                                    │                                                 │
│ │         ocr_text = "['日常', '御魂', '斗技', '逢魔', '寮活动', '道馆/突破', '真蛇']"                     │                                                 │
│ │             self = <script_task.ScriptTask object at 0x0000020F05CAC9A0>                                 │                                                 │
│ │             team = -1                                                                                    │                                                 │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Switch soul_one group must be in [1-7]                                                                                                              
2026-05-21 10:53:10.806 |            script.py:0104 |  WARNING | Saving error: ./log/error/1779331990806

截图

Image

还有别的吗?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions