-2

我只使用 PIL,然后当我使用 pytesser 时它可以正常工作,然后它不能正常工作。我能做些什么呢?

from PIL import Image
from pytesser import *

image_file = Image.open("vote.jpg")
im = Image.open(image_file)
text = image_to_string(im)
print text

Traceback (most recent call last):
  File "C:/Users/Tanvir/Desktop/py thon hand/hala.py", line 4, in <module>
    image_file = Image.open("vote.jpg")
  File "C:\Pythons27\lib\site-packages\PIL\Image.py", line 2286, in open
    % (filename if filename else fp))
IOError: cannot identify image file 'vote.jpg'
4

1 回答 1

0

我找到了这个解决方案。这是 PIL 的问题,所以首先我必须卸载这个 PIL 模块,然后再次安装它并完成工作一切都很好。

于 2015-12-28T09:30:23.183 回答