-2

I am using only PIL then it's work properly when I use pytesser then it doesn't work properly .What can i do for it?

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'
alibaba
  • 61
  • 5
  • The error message seems to have nothing to do with pytesser. Are you certain that your image file is still on your search path? If you comment out `from pytesser import *` does the code work? (If not, then something happened to vote.jpg.) You might try `import pytesser` instead of `from pytesser import *` – user1245262 Dec 26 '15 at 03:48
  • I am using " import pytesser " but it give me a error which is " AttributeError: read " – alibaba Dec 26 '15 at 21:14

1 Answers1

0

I am find this solution .It was problem with PIL so at first I have to uninstall this PIL module then again install it and job done Every thing is okay.

alibaba
  • 61
  • 5