JGM-Automator icon indicating copy to clipboard operation
JGM-Automator copied to clipboard

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

Open BinqiZhang opened this issue 5 years ago • 0 comments

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'

BinqiZhang avatar Oct 18 '19 07:10 BinqiZhang