Acamy / pet-chain-buyer

百度莱茨狗抢购脚本,采用多线程查询购买,支持调用API识别验证码,Google tesseract-ocr识别验证码以及手动输入验证码三种方式,代码持续优化中
43 stars 17 forks source link

OSError: [Errno 2] No such file or directory #4

Open huangweijun opened 6 years ago

huangweijun commented 6 years ago

Traceback (most recent call last): File "pet_chain.py", line 89, in purchase self.captcha = ocr.ocr_img(img) File "/Users/huangweijun/Documents/baidu/golang/src/baidu/pet-chain-buyer/ocr.py", line 48, in ocr_img result = pytesseract.image_to_string(image) File "/Library/Python/2.7/site-packages/pytesseract/pytesseract.py", line 193, in image_to_string return run_and_get_output(image, 'txt', lang, config, nice) File "/Library/Python/2.7/site-packages/pytesseract/pytesseract.py", line 140, in run_and_get_output run_tesseract(**kwargs) File "/Library/Python/2.7/site-packages/pytesseract/pytesseract.py", line 111, in run_tesseract proc = subprocess.Popen(command, stderr=subprocess.PIPE) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

Acamy commented 6 years ago

项目目录里的验证码图片能正常打开吗