AzurLaneAutoScript
AzurLaneAutoScript copied to clipboard
自律开荒二期兵装图时寻敌报错
在提问之前...
- [X] 我已经搜索了现有的 issues
- [X] 我在提问题之前至少花费了 5 分钟来思考和准备
- [X] 我已经阅读了 Wiki 中的 常见问题(FAQ)
- [X] 我正在使用最新版的 Alas
描述你的问题
运行作战档案的自动开荒“激奏的Polaris”和“激唱的Universe”时: 脚本寻敌两至三次后,脚本日志报无战斗发生且撤退舰队。 其后脚本停止运行并报错。
如何复现
- 前往 '作战档案-激奏的Polaris-sp1'(脚本开荒)
- 点击 '出击'
- 脚本滑动寻敌作战两至三次
- 有敌人存在的情况下撤退
- 出现问题并报错卡死
预期行为
No response
相关 Logs
2022-10-16 10:58:54.671 | INFO | [enemy_missing] EN: 3, MY: 0, SI: 1, BO: 0, CA: 0
2022-10-16 10:58:54.674 | INFO | [enemy_may____] EN: 1, MY: 0, SI: 0, BO: 0, CA: 1
2022-10-16 10:58:54.677 | INFO | A B C D E F G
2022-10-16 10:58:54.679 | INFO | 1 ++ ++ ++ -- -- -- --
2022-10-16 10:58:54.681 | INFO | 2 -- -- -- -- -- Fl --
2022-10-16 10:58:54.683 | INFO | 3 Fl -- -- -- -- -- ++
2022-10-16 10:58:54.685 | INFO | 4 -- == -- ++ -- -- --
2022-10-16 10:58:54.688 | INFO | 5 -- -- -- -- -- -- --
2022-10-16 10:58:54.690 | INFO | 6 ++ ++ -- -- -- -- --
2022-10-16 10:58:54.693 | INFO | 7 ++ ++ -- -- -- -- --
2022-10-16 10:58:54.698 | INFO | A B C D E F G
2022-10-16 10:58:54.701 | INFO | 1 9999 9999 9999 3 2 1 2
2022-10-16 10:58:54.703 | INFO | 2 5 4 3 2 1 0 1
2022-10-16 10:58:54.706 | INFO | 3 6 5 4 3 2 1 9999
2022-10-16 10:58:54.709 | INFO | 4 7 6 5 9999 3 2 3
2022-10-16 10:58:54.712 | INFO | 5 8 7 6 5 4 3 4
2022-10-16 10:58:54.715 | INFO | 6 9999 9999 7 6 5 4 5
2022-10-16 10:58:54.716 | INFO | 7 9999 9999 8 7 6 5 6
────────────────────────────────────────────────────── BATTLE_2 ───────────────────────────────────────────────────────
2022-10-16 10:58:54.720 | INFO | BATTLE_2
2022-10-16 10:58:54.722 | INFO | Using function: battle_0
2022-10-16 10:58:54.725 | WARNING | No battle executed.
2022-10-16 10:58:54.728 | WARNING | ScriptError, No combat executed.
2022-10-16 10:58:54.730 | WARNING | ScriptError, No combat executed, Withdrawing
────────────────────────────────────────────────────── BATTLE_2 ───────────────────────────────────────────────────────
2022-10-16 10:58:54.734 | INFO | BATTLE_2
2022-10-16 10:58:54.736 | INFO | Using function: battle_0
2022-10-16 10:58:54.738 | WARNING | No battle executed.
2022-10-16 10:58:54.740 | WARNING | ScriptError, No combat executed.
2022-10-16 10:58:54.744 | WARNING | ScriptError, No combat executed, Withdrawing
────────────────────────────────────────────────────── BATTLE_2 ───────────────────────────────────────────────────────
2022-10-16 10:58:54.748 | INFO | BATTLE_2
2022-10-16 10:58:54.750 | INFO | Using function: battle_0
2022-10-16 10:58:54.752 | WARNING | No battle executed.
2022-10-16 10:58:54.754 | WARNING | ScriptError, No combat executed.
2022-10-16 10:58:54.757 | WARNING | ScriptError, No combat executed, Withdrawing
2022-10-16 10:59:00.131 | ERROR | CampaignEnd: In stage.
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ │
│ D:\Game and Entertainment\AzurLaneAutoScript\alas.py:63 in run │
│ │
│ 60 │ def run(self, command): │
│ 61 │ │ try: │
│ 62 │ │ │ self.device.screenshot() │
│ > 63 │ │ │ self.__getattribute__(command)() │
│ 64 │ │ │ return True │
│ 65 │ │ except TaskEnd: │
│ 66 │ │ │ return True │
│ │
│ ┌───────────────────────────── locals ─────────────────────────────┐ │
│ │ command = 'war_archives' │ │
│ │ e = CampaignEnd('In stage.') │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x0000020275434088> │ │
│ └──────────────────────────────────────────────────────────────────┘ │
│ D:\Game and Entertainment\AzurLaneAutoScript\alas.py:260 in war_archives │
│ │
│ 257 │ def war_archives(self): │
│ 258 │ │ from module.war_archives.war_archives import CampaignWarArchives │
│ 259 │ │ CampaignWarArchives(config=self.config, device=self.device).run( │
│ > 260 │ │ │ name=self.config.Campaign_Name, folder=self.config.Campaign_Event, │
│ mode=self.config.Campaign_Mode) │
│ 261 │ │
│ 262 │ def raid_daily(self): │
│ 263 │ │ from module.raid.daily import RaidDaily │
│ │
│ ┌─────────────────────────────────────── locals ───────────────────────────────────────┐ │
│ │ CampaignWarArchives = <class 'module.war_archives.war_archives.CampaignWarArchives'> │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x0000020275434088> │ │
│ └──────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Game and Entertainment\AzurLaneAutoScript\module\war_archives\war_archives.py:35 in run │
│ │
│ 32 │ │
│ 33 │ def run(self, name=None, folder='campaign_main', mode='normal', total=0): │
│ 34 │ │ backup = self.config.temporary(USE_DATA_KEY=True) │
│ > 35 │ │ super().run(name, folder, mode, total) │
│ 36 │ │ backup.recover() │
│ 37 │ │ self.ui_goto_main() # Go to main, as remaining in page can throw off Event task │
│ 38 │
│ │
│ ┌──────────────────────────────────────────── locals ─────────────────────────────────────────────┐ │
│ │ __class__ = <class 'module.war_archives.war_archives.CampaignWarArchives'> │ │
│ │ backup = <module.config.config.ConfigBackup object at 0x000002022627F108> │ │
│ │ folder = 'war_archives_20211014_cn' │ │
│ │ mode = 'normal' │ │
│ │ name = 'sp1' │ │
│ │ self = <module.war_archives.war_archives.CampaignWarArchives object at 0x000002022628D108> │ │
│ │ total = 0 │ │
│ └─────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Game and Entertainment\AzurLaneAutoScript\module\campaign\run.py:297 in run │
│ │
│ 294 │ │ │ │
│ 295 │ │ │ # Run │
│ 296 │ │ │ try: │
│ > 297 │ │ │ │ self.campaign.run() │
│ 298 │ │ │ except ScriptEnd as e: │
│ 299 │ │ │ │ logger.hr('Script end') │
│ 300 │ │ │ │ logger.info(str(e)) │
│ │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │ folder = 'war_archives_20211014_cn' │ │
│ │ mode = 'normal' │ │
│ │ name = 'sp1' │ │
│ │ self = <module.war_archives.war_archives.CampaignWarArchives object at 0x000002022628D108> │ │
│ │ total = 0 │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Game and Entertainment\AzurLaneAutoScript\module\campaign\campaign_base.py:152 in run │
│ │
│ 149 │ │ logger.warning('Battle function exhausted.') │
│ 150 │ │ if self.config.Error_HandleError: │
│ 151 │ │ │ logger.warning('ScriptError, Battle function exhausted, Withdrawing') │
│ > 152 │ │ │ self.withdraw() │
│ 153 │ │ else: │
│ 154 │ │ │ raise ScriptError('Battle function exhausted.') │
│ 155 │
│ │
│ ┌─────────────────────────────────────── locals ───────────────────────────────────────┐ │
│ │ _ = 19 │ │
│ │ self = <campaign.war_archives_20211014_cn.sp1.Campaign object at 0x00000202255F0AC8> │ │
│ └──────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Game and Entertainment\AzurLaneAutoScript\module\map\map_operation.py:288 in withdraw │
│ │
│ 285 │ │ │ │ continue │
│ 286 │ │ │ │
│ 287 │ │ │ # End │
│ > 288 │ │ │ if self.handle_in_stage(): │
│ 289 │ │ │ │ raise CampaignEnd('Withdraw') │
│ 290 │ │
│ 291 │ def handle_map_cat_attack(self): │
│ │
│ ┌─────────────────────────────────────────────── locals ────────────────────────────────────────────────┐ │
│ │ self = <campaign.war_archives_20211014_cn.sp1.Campaign object at 0x00000202255F0AC8> │ │
│ │ skip_first_screenshot = False │ │
│ └───────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ D:\Game and Entertainment\AzurLaneAutoScript\module\handler\enemy_searching.py:39 in handle_in_stage │
│ │
│ 36 │ │ │ if self.in_stage_timer.reached(): │
│ 37 │ │ │ │ logger.info('In stage.') │
│ 38 │ │ │ │ self.ensure_no_info_bar(timeout=1.2) │
│ > 39 │ │ │ │ raise CampaignEnd('In stage.') │
│ 40 │ │ │ else: │
│ 41 │ │ │ │ return False │
│ 42 │ │ else: │
│ │
│ ┌─────────────────────────────────────── locals ───────────────────────────────────────┐ │
│ │ self = <campaign.war_archives_20211014_cn.sp1.Campaign object at 0x00000202255F0AC8> │ │
│ └──────────────────────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
截图

还有别的吗?

这个是一期兵装活动,这个活动的地图文件因为alas并没有提供,是我根据wiki数据和地图数据弄的,用自己的小号测试了一次是可以全部打通了的,开荒的话建议关闭自律寻敌(因为开荒没有自律寻敌可用)试试。
感谢你的解答!我的问题已经解决了 在去掉自律寻敌选项后脚本已经运行正常。