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

测试分辨率报错 #6

Open
ZakiuC opened this issue May 20, 2022 · 2 comments
Open

测试分辨率报错 #6

ZakiuC opened this issue May 20, 2022 · 2 comments

Comments

@ZakiuC
Copy link

ZakiuC commented May 20, 2022

截图时出现错误: error(1400, 'GetWindowRect', '无效的窗口句柄。')
截图时出现错误: error(1400, 'GetWindowRect', '无效的窗口句柄。')
截图时出现错误: error(1400, 'GetWindowRect', '无效的窗口句柄。')
Traceback (most recent call last):
File "H:\Code Files\Python\Pycharm\DouZero_For_HLDDZ_FullAuto\DouZero_For_HLDDZ_FullAuto-main\debug_screenshot.py", line 7, in
img = gh.DrawRectWithText(img, (313, 747, 1144, 200), "test")
File "H:\Code Files\Python\Pycharm\DouZero_For_HLDDZ_FullAuto\DouZero_For_HLDDZ_FullAuto-main\GameHelper.py", line 29, in DrawRectWithText
img = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
cv2.error: OpenCV(4.5.5) 👎 error: (-5:Bad argument) in function 'cvtColor'

Overload resolution failed:

  • src data type = 17 is not supported
  • Expected Ptrcv::UMat for argument 'src'
@shuaidemeikan
Copy link

用管理员身份运行

@dqgod
Copy link

dqgod commented Aug 27, 2022

main函数里 176行 self.Handle = win32gui.FindWindow("Hlddz", None), 需要把里面“hlddz”改成你自己运行的斗地主的代码

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

3 participants