运行过程中概率性error
在提问之前...
- [X] 我已经搜索了现有的 issues
- [X] 我在提问题之前至少花费了 5 分钟来思考和准备
- [X] 我已经阅读了 Wiki 中的 常见问题(FAQ)
- [X] 我正在使用最新版的 Alas
描述你的问题
同标题
如何复现
- 前往 '...'
- 点击 '....'
- 滑动到 '....'
- 出现问题
预期行为
No response
相关 Logs
WARNING 19:03:28.781 │ Unexpected screenshot: b''
ERROR 19:03:28.782 │ error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Tem
p\pip-req-build-c2l3r8zm\opencv\modules\imgcodecs\src\loadsave.cpp:818:
error: (-215:Assertion failed) !buf.empty() in function 'cv::imdecode_'
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ │
│ C:\Users\puhao\Desktop\AzurLaneAutoScript\module\device\method\adb.py: │
│ 31 in retry_wrapper │
│ │
│ 29 │ │ │ │ │ retry_sleep(_) │
│ 30 │ │ │ │ │ init() │
│ ❱ 31 │ │ │ │ return func(self, *args, **kwargs) │
│ 32 │ │ │ # Can't handle │
│ 33 │ │ │ except RequestHumanTakeover: │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ _ = 3 │ │
│ │ args = () │ │
│ │ e = error("OpenCV(4.5.3) │ │
│ │ C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-req-bu… │ │
│ │ error: (-215:Assertion failed) !buf.empty() in function │ │
│ │ 'cv::imdecode_'\n") │ │
│ │ func = <function Adb.screenshot_adb at 0x00000241446A7C18> │ │
│ │ init = <function retry.<locals>.retry_wrapper.<locals>.init at │ │
│ │ 0x0000024164F26798> │ │
│ │ kwargs = {} │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000002417E47F9C8> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ C:\Users\puhao\Desktop\AzurLaneAutoScript\module\base\decorator.py:70 │
│ in wrapper │
│ │
│ 68 │ │ │ │ │ │ continue │
│ 69 │ │ │ │ │ │
│ ❱ 70 │ │ │ │ │ return record['func'](self, *args, **kwargs) │
│ 71 │ │ │ │ │
│ 72 │ │ │ │ logger.warning(f'No option fits for {name}, usin │
│ func.') │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ args = () │ │
│ │ cls = <class 'module.base.decorator.Config'> │ │
│ │ flag = [True] │ │
│ │ func = <function Adb.screenshot_adb at 0x00000241446A7B88> │ │
│ │ kwargs = {} │ │
│ │ logger = <Logger alas (INFO)> │ │
│ │ name = 'screenshot_adb' │ │
│ │ record = { │ │
│ │ │ 'options': {'DEVICE_OVER_HTTP': False}, │ │
│ │ │ 'func': <function Adb.screenshot_adb at │ │
│ │ 0x00000241446A79D8> │ │
│ │ } │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000002417E47F9C8> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Users\puhao\Desktop\AzurLaneAutoScript\module\device\method\adb.py: │
│ 158 in screenshot_adb │
│ │
│ 156 │ │ │ logger.warning(f'Unexpected screenshot: {data}') │
│ 157 │ │ │
│ ❱ 158 │ │ return self.__process_screenshot(data) │
│ 159 │ │
│ 160 │ @retry │
│ │
│ ╭───────────────────────────── locals ──────────────────────────────╮ │
│ │ data = b'' │ │
│ │ self = <module.device.device.Device object at 0x000002417E47F9C8> │ │
│ ╰───────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Users\puhao\Desktop\AzurLaneAutoScript\module\device\method\adb.py: │
│ 140 in __process_screenshot │
│ │
│ 138 │ │ for method in self.__screenshot_method_fixed: │
│ 139 │ │ │ try: │
│ ❱ 140 │ │ │ │ result = self.__load_screenshot(screenshot, meth │
│ 141 │ │ │ │ self.__screenshot_method_fixed = [method] + self │
│ 142 │ │ │ │ return result │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ method = 0 │ │
│ │ screenshot = b'' │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000002417E47F9C8> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ C:\Users\puhao\Desktop\AzurLaneAutoScript\module\device\method\adb.py: │
│ 127 in __load_screenshot │
│ │
│ 125 │ │ │ raise ImageTruncated('Empty image after reading from │
│ 126 │ │ │
│ ❱ 127 │ │ image = cv2.imdecode(image, cv2.IMREAD_COLOR) │
│ 128 │ │ if image is None: │
│ 129 │ │ │ raise ImageTruncated('Empty image after cv2.imdecode │
│ │
│ ╭────────────── locals ───────────────╮ │
│ │ image = array([], dtype=uint8) │ │
│ │ method = 0 │ │
│ │ screenshot = b'' │ │
│ ╰─────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────╯
error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build
-c2l3r8zm\opencv\modules\imgcodecs\src\loadsave.cpp:818: error:
(-215:Assertion failed) !buf.empty() in function 'cv::imdecode_'
ERROR 19:03:31.871 │ AdbError: device offline
CRITICAL 19:03:31.873 │ Retry screenshot_adb() failed
CRITICAL 19:03:31.874 │ Request human takeover
INFO 19:03:31.875 │ No provider specified, skip sending
截图
No response
还有别的吗?
No response
用的是啥模拟器?还有啥截图方案?
截图方案ADB,模拟器为夜神模拟器
1335740481 @.***
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年5月20日(星期六) 晚上9:05 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [LmeSzinc/AzurLaneAutoScript] 运行过程中概率性error (Issue #2596)
用的是啥模拟器?还有啥截图方案? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
截图方案ADB,模拟器为夜神模拟器 1335740481 @.*** … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年5月20日(星期六) 晚上9:05 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [LmeSzinc/AzurLaneAutoScript] 运行过程中概率性error (Issue #2596) 用的是啥模拟器?还有啥截图方案? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
是不是更新了?夜神最近版本有bug,可以看看#2584
OKOK
1335740481 @.***
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年5月20日(星期六) 晚上9:12 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [LmeSzinc/AzurLaneAutoScript] 运行过程中概率性error (Issue #2596)
截图方案ADB,模拟器为夜神模拟器 1335740481 @.*** … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年5月20日(星期六) 晚上9:05 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [LmeSzinc/AzurLaneAutoScript] 运行过程中概率性error (Issue #2596) 用的是啥模拟器?还有啥截图方案? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
是不是更新了?夜神最近版本有bug,可以看看#2584
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>