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

政策中心升级的时候程序报错退出 #45

Open
ansemz opened this issue Oct 14, 2019 · 1 comment
Open

政策中心升级的时候程序报错退出 #45

ansemz opened this issue Oct 14, 2019 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@ansemz
Copy link

ansemz commented Oct 14, 2019

Traceback (most recent call last):
File "main.py", line 25, in
instance.start()
File "/mnt/d/Downloads/JGM-Automator/automator.py", line 42, in start
self.check_policy()
File "/mnt/d/Downloads/JGM-Automator/automator.py", line 142, in check_policy
if len(UIMatcher.findGreenArrow(self.d.screenshot(format="opencv"))):
File "/mnt/d/Downloads/JGM-Automator/cv.py", line 36, in findGreenArrow
cX = int(M["m10"] / M["m00"])
ZeroDivisionError: float division by zero

@jimowutong42
Copy link
Contributor

openCV版本差异问题:
openCV2和openCV4中,findContours这个轮廓提取函数会返回两个值:
①轮廓的点集(contours)
②各层轮廓的索引(hierarchy)
openCV3中,则会返回三个值:
①处理的图像(image)
②轮廓的点集(contours)
③各层轮廓的索引(hierarchy)

更新代码、更新依赖即可:
python -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/

@TsingWei TsingWei pinned this issue Oct 14, 2019
@TsingWei TsingWei added the documentation Improvements or additions to documentation label Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants