0
Traceback (most recent call last):
File "C:\Python27\Stuff\imagetotext.py", line 9, in <module>
i = pytesseract.image_to_string(img)
File "C:\Python27\lib\site-packages\pytesseract\pytesseract.py", line 143, in
image_to_string
if len(image.split()) == 4:
AttributeError: 'PixelAccess' object has no attribute 'split'
これでどうしたらよいか分かりません。 https://gyazo.com/63c6439285d629c72e9076c1b4a29a42はtest.pngです。私はたくさん試しました。Python 2.7 PyTesseract AttributeError: 'PixelAccess'オブジェクトに 'split'属性がありません
try:
import Image
except ImportError:
from PIL import Image
import pytesseract
img = Image.open('test.bmp').load()
#img.load()
i = pytesseract.image_to_string(img)
print i
私はそれがPILのバグかもしれないが、私は気づいていない。
WindowsError:[エラー2]指定されたファイルが見つかりません –
同じフォルダにあります。 –
あなたはtesseractがインストールされていないと思います。 – RAVI