4

请帮我解决这个问题~

使用pytesseract时出现如下错误:</p>

Traceback (most recent call last):
  File "E:/pycharm/PycharmProjects/spider/test/test_orc.py", line 12, in <module>
    vcode = pytesseract.image_to_string(image)
  File "E:\pycharm\PycharmProjects\spider\test\pytesseract.py", line 169, in image_to_string
    raise TesseractError(status, errors)
pytesseract.TesseractError: (1, '\xcf\xb5\xcd\xb3\xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc2\xb7\xbe\xb6\xa1\xa3')

我使用 pip 安装枕头和 pytesseract。我还在 C:\Program Files (x86)\Tesseract-OCR 中安装了 tesseract-ocr-setup-3.02.02.exe,路径没问题

我的代码是:</p>

# coding=utf-8
import pytesseract
from PIL import Image

image = Image.open('vcode.png')
vcode = pytesseract.image_to_string(image)
print vcode

非常感谢

4

0 回答 0