Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行推主线报错 (-215:Assertion failed) !ssize.empty() in function 'cv::resize' #213

Open
Kihh opened this issue Jan 10, 2025 · 1 comment

Comments

@Kihh
Copy link

Kihh commented Jan 10, 2025

    INFO | 2025-01-11 00:30:25 | --------Initializing All Data---------- 
    INFO | 2025-01-11 00:30:25 | --------------Init Emulator---------------- 
    INFO | 2025-01-11 00:30:25 | Serial : 127.0.0.1:16416 
    INFO | 2025-01-11 00:30:25 | Detect Device 
    INFO | 2025-01-11 00:30:25 | Available devices are listed below, choose the one you want to run BAAS on. 
    INFO | 2025-01-11 00:30:25 | 1 : [ 127.0.0.1:16416 ] 
    INFO | 2025-01-11 00:30:25 | already connected to 127.0.0.1:16416 
    INFO | 2025-01-11 00:30:25 | Detect Package 
    INFO | 2025-01-11 00:30:25 | Check Package [ com.RoamingStar.BlueArchive ] Exist. 
    INFO | 2025-01-11 00:30:25 | List Packages 
    INFO | 2025-01-11 00:30:25 | Package Found. 
    INFO | 2025-01-11 00:30:25 | Server : CN 
    INFO | 2025-01-11 00:30:25 | MuMu Keep Alive :  
    INFO | 2025-01-11 00:30:25 | screenshot_interval set to 0.3 
    INFO | 2025-01-11 00:30:25 | Screenshot method : uiautomator2 
    INFO | 2025-01-11 00:30:25 | Control method : uiautomator2 
    INFO | 2025-01-11 00:30:25 | screenshot_interval set to 0.3 
    INFO | 2025-01-11 00:30:25 | --------------Check ATX install ---------------- 
    INFO | 2025-01-11 00:30:25 | Device [ 127.0.0.1:16416 ] is online. 
    INFO | 2025-01-11 00:30:25 | Uiautomator2 service started. 
    INFO | 2025-01-11 00:30:25 | Screen Size  (0, 0) 
 WARNING | 2025-01-11 00:30:25 | Screen Size is not 1280x720, we recommend you to use 1280x720.  

这里我模拟器分辨率使用的是1280x720

    INFO | 2025-01-11 00:30:25 | Screen Size Ratio: 0.0 
    INFO | 2025-01-11 00:30:25 | --------Emulator Init Finished---------- 
    INFO | 2025-01-11 00:30:25 | --------Initialization Finished---------- 
    INFO | 2025-01-11 00:30:25 | START pushing main story 
    INFO | 2025-01-11 00:30:26 | end : main_page 
   ERROR | 2025-01-11 00:30:26 | OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4152: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

   ERROR | 2025-01-11 00:30:26 | OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4152: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

下载的是release中的最新版本完整包,模拟器mumu,官服

@pur1fying
Copy link
Owner

1.在BAAS的安装路径下创建test.py,并复制以下代码

import uiautomator2
device = uiautomator2.connect("127.0.0.1:16416")    # 此处填你的模拟器端口
try:
    info = device.http.get('/info').json()
    w, h = info['display']['width'], info['display']['height']
    if w < h:
        w, h = h, w
    print(w, h)
except Exception as e:
    print(e)

在根目录下启动命令行运行

"env/scripts/python.exe" test.py

多次运行并汇报结果

2.同时你可以启动BAAS并观察是否每次日志输出的ScreenSize是否正确

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants