Coder Social home page Coder Social logo

Comments (20)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
[deleted comment]

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
In this version of PyTesser, the installation files must be in the same 
directory as
the script importing PyTesser.  Later versions will be more suitable for 
installing
in site-packages, or at least more explicit about usage limitations.  

Original comment by [email protected] on 6 Aug 2007 at 11:36

  • Changed state: Accepted

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I get this too. 

>>> from pytesser import *
>>> import Image
>>> im=Image.open('phototest.tif')
>>> text=image_to_string(im)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/shemtov/afik/pyt/pytesser.py", line 31, in image_to_string
    call_tesseract(scratch_image_name, scratch_text_name_root)
  File "/home/shemtov/afik/pyt/pytesser.py", line 21, in call_tesseract
    proc = subprocess.Popen(args)
  File "/usr/local/lib/python2.4/subprocess.py", line 542, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.4/subprocess.py", line 975, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

The installation files are in the same directory as the script i'm trying to, 
use,
and this should be even a moot point because I'm using the interpreter and it 
isn't
working. What am I missing?

Original comment by [email protected] on 17 Jun 2008 at 6:27

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
It looks like you're using *NIX.  PyTesser was developed for Windows--it might 
work
in *NIX if you substitute a native Tesseract executable, but you'll have to be
careful about filenames.

Original comment by [email protected] on 18 Jun 2008 at 4:58

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
[deleted comment]

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
i have exactly the same problems does having windows 7 make a difference??

Original comment by [email protected] on 8 Mar 2010 at 11:01

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I'm on Windows 7 and having exactly the same problem. I have tried setting 
tesseract.exe to run in compatibility with earlier versions of Windows, and as 
administrator. 

Original comment by [email protected] on 22 Mar 2010 at 11:15

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
This is just horrible... how is this not working in Linux in Python? Have you 
never heard of os independant path's? hm...

Original comment by [email protected] on 23 Jul 2010 at 2:02

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
works fine in linux as long as tesseract executable is in PATH :)
Tested on Ubuntu 10.04 and CentOS 5.4

Original comment by [email protected] on 7 Sep 2010 at 11:32

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
[deleted comment]

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Please help I get the same error with MAC OSx and python 2.6


 File "ex.py", line 3, in <module>
    print image_to_string(image)     # Run tesseract.exe on image
  File "/Users/gabrielcarneironovaes/Sites/python/pytesser/pytesser.py", line 31, in image_to_string
    call_tesseract(scratch_image_name, scratch_text_name_root)
  File "/Users/gabrielcarneironovaes/Sites/python/pytesser/pytesser.py", line 21, in call_tesseract
    proc = subprocess.Popen(args)
  File "/Applications/MAMP/python/framework/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/Applications/MAMP/python/framework/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Original comment by [email protected] on 20 Apr 2011 at 2:43

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
i got the same error, im running on Ubuntu 11.04 with python 2.7

Traceback (most recent call last):
  File "test.py", line 15, in <module>
    pytesser.image_to_string(data)
  File "/home/jose/Documentos/Geek/pytesser.py", line 31, in image_to_string
    call_tesseract(scratch_image_name, scratch_text_name_root)
  File "/home/jose/Documentos/Geek/pytesser.py", line 21, in call_tesseract
    proc = subprocess.Popen(args)
  File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1213, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Original comment by [email protected] on 24 Aug 2011 at 9:45

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Another one of those "Doesn't work the way it's ****ing suppose to." A quick 
"I'll have this script ready in a few minutes" turned into a "My eyes are 
strained because I'v been staring at the damn screen for the past 3 hours 
trying to solve the same problem everybody else is experiencing above me"

It doesn't seem like anybody cared enough to guide us through a problem that's 
been going around since 2007 (it's 2011 now).... 


Original comment by [email protected] on 1 Oct 2011 at 6:25

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
same problme here, windows7 32bit, Python2.6

Original comment by [email protected] on 28 Nov 2011 at 11:31

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
[deleted comment]

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
There's an easy work around for this if you're using the pytesser directory as 
a submodule (you've added an empty __init__.py file):


Change this line in pytesser.py (line 13):
    tesseract_exe_name = 'tesseract'

to this:
    tesseract_exe_name = os.path.dirname(__file__) + '/tesseract' 


That way it will look in the correct place for the executable.

Original comment by [email protected] on 24 May 2012 at 10:00

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
The program 'tesseract' is currently not installed.  You can install it by 
typing:

sudo apt-get install tesseract-ocr

Original comment by [email protected] on 14 Mar 2013 at 5:32

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Email #17 by [email protected] was the answer for me.

Original comment by [email protected] on 20 Jun 2014 at 10:24

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I know why this happend:

because the python script use the command: tesseract, accutally like this:  
./tesseract  input-image
but you do not install "tesseract", so it told you : The system cannot find the 
file specified

details:

1. I's not the python script who "read" the words from the picture,  It's a 
command:  "tesseract"
2. why subprocess?  because, the python execute the cmd use multi-process,  the 
equal effect codes are like this: 
    os.system("tesseract  -input_pic,  -output_words ) , 

Original comment by [email protected] on 8 Nov 2014 at 2:06

from pytesser.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
For the next person who struggles with this, open pytesser.py and the first 
line that says:

    Import Image

Change this to 

    from PIL import Image


solved my issue.

Original comment by [email protected] on 27 Jun 2015 at 2:11

from pytesser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.