import pytesseract
from PIL import Image
pytesseract.pytesseract.tesseract_cmd = '/usr/local/bin/tesseract'
image = Image.open('/data/22222.jpeg')
vcode = pytesseract.image_to_string(image)
print(vcode)
怎么会提示这个错误?
Traceback (most recent call last):
File "/python_env/python_project/data/learn/learn10.py", line 7, in <module>
vcode = pytesseract.image_to_string(image)
File "/python_env/py3_env/lib/python3.5/site-packages/pytesseract/pytesseract.py", line 195, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "/python_env/py3_env/lib/python3.5/site-packages/pytesseract/pytesseract.py", line 141, in run_and_get_output
run_tesseract(**kwargs)
File "/python_env/py3_env/lib/python3.5/site-packages/pytesseract/pytesseract.py", line 118, in run_tesseract
raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, 'Tesseract Open Source OCR Engine v3.05.02 with Leptonica Error in fopenReadStream: file not found Error in findFileFormat: image file not found Error during processing.')
Process finished with exit code 1