Skip to content
New issue

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

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

Already on GitHub? # to your account

扫货过程中,报异常退出,遇到两次了,先记录 #58

Open
BinqiZhang opened this issue Oct 18, 2019 · 0 comments
Open

扫货过程中,报异常退出,遇到两次了,先记录 #58

BinqiZhang opened this issue Oct 18, 2019 · 0 comments

Comments

@BinqiZhang
Copy link
Contributor

Traceback (most recent call last):
File "main.py", line 27, in
instance.start()
File "D:\Simple-JiaGuoMeng-Agent-master-saohuo\automator.py", line 47, in start
self.check_goods()
File "D:\Simple-JiaGuoMeng-Agent-master-saohuo\automator.py", line 167, in check_goods
self.harvest(self.harvest_filter, good_id)
File "D:\Simple-JiaGuoMeng-Agent-master-saohuo\automator.py", line 85, in harvest
pos_id = self.guess_good(good)
File "D:\Simple-JiaGuoMeng-Agent-master-saohuo\automator.py", line 97, in guess_good
diff_screens = self.get_screenshot_while_touching(GOODS_POSITIONS[good_id])
File "D:\Simple-JiaGuoMeng-Agent-master-saohuo\automator.py", line 104, in get_screenshot_while_touching
screen_before = self.d.screenshot(format="opencv")
File "C:\Users\binqi.zhang\AppData\Local\Programs\Python\Python37-32\lib\site-packages\uiautomator2_init_.py", line 1175, in screenshot
return self.session().screenshot(*args, **kwargs)
File "<C:\Users\binqi.zhang\AppData\Local\Programs\Python\Python37-32\lib\site-packages\decorator.py:decorator-gen-6>", line 2, in screenshot
File "C:\Users\binqi.zhang\AppData\Local\Programs\Python\Python37-32\lib\site-packages\retry\api.py", line 74, in retry_decorator
logger)
File "C:\Users\binqi.zhang\AppData\Local\Programs\Python\Python37-32\lib\site-packages\retry\api.py", line 33, in _retry_internal
return f()
File "C:\Users\binqi.zhang\AppData\Local\Programs\Python\Python37-32\lib\site-packages\uiautomator2\session.py", line 482, in screenshot
return cv2.imdecode(nparr, cv2.IMREAD_COLOR)
cv2.error: OpenCV(3.4.7) C:\projects\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:751: error: (-215:Assertion failed) !buf.empty() in function 'cv::imdecode
'

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

No branches or pull requests

1 participant