社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  问与答

请教关于tesseract的问题

421096873 • 6 年前 • 640 次点击  

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

最后一次修改于 (2018-10-27 23:35)
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/25615
 
640 次点击