Giter Club home page Giter Club logo

python-tesseract's People

Contributors

3togo avatar

Watchers

 avatar

python-tesseract's Issues

MAC OS X Mavericks (10.9), ImportError

Already tried all the possible methods (via brew, and via ports from source)

MAC OS X Mavericks (10.9)

python test.py
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    import tesseract
  File "/Testing/python-tesseract-read-only/tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "/Testing/python-tesseract-read-only/tesseract.py", line 18, in swig_import_helper
    import _tesseract
ImportError: 
dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/python_tesseract-only-py2.7-macosx-10.9-x86_64.egg/_tesseract.so,
 2): Symbol not found: __ZN9tesseract11TessBaseAPI12GetTextlinesEPP4PixaPPi
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/python_tesseract-only-py2.7-macosx-10.9-x86_64.egg/_tesseract.so
  Expected in: flat namespace
 in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/python_tesseract-only-py2.7-macosx-10.9-x86_64.egg/_tesseract.so



Original issue reported on code.google.com by [email protected] on 3 Nov 2013 at 10:12

ImportError: DLL load failed: The specified module could not be found.

It was working file but suddenly, i started receiving the error. I think, after 
installing Google App Engine . or depolying the App caused the error

import tesseract producing error

Windows 7 Py2.75 


Traceback (most recent call last):
  File "G:\...........................\Tesseract Examples\test2.py", line 2, in <module>
    import tesseract
  File "C:\Python27\lib\site-packages\tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "C:\Python27\lib\site-packages\tesseract.py", line 22, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.

Original issue reported on code.google.com by [email protected] on 18 Jul 2013 at 12:38

Dependency with libopencv-core2.3

What steps will reproduce the problem?
1. Install Linux Mint 15 
2. Install the SimpleCV superpack
3. Try to install the python-tesseract package

What is the expected output? What do you see instead?
When trying to install it say that the Dependency is not satisfiable: 
libopencv-core2.3

What version of the product are you using? On what operating system?
Trying to install the latest python-tesseract 0.8-1.5 for the i386 plataform, 
im using Linux Mint 15


The problem seems to be that the lastest libopencv-core2.4 is installed but the 
python-tesseract package don't accept.

Original issue reported on code.google.com by [email protected] on 11 Oct 2013 at 7:37

Attachments:

with python2.7

I am also trying to install on ubuntu 10.10 amd64 which has python2.6 by 
default. 

I try both install python2.7 from source and apt-get install python2.7

But get the following error. 


dpkg: dependency problems prevent configuration of python-tesseract:
 python-tesseract depends on python (>= 2.7); however:
  Version of python on system is 2.6.6-2ubuntu2.
dpkg: error processing python-tesseract (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-tesseract

Original issue reported on code.google.com by [email protected] on 16 Dec 2011 at 7:47

AttributeError: 'module' object has no attribute 'SetCvImage'

What steps will reproduce the problem?

1. Installing python-tesseract-0.8-1.7_20130612_.macosx-10.8-x86_64 using the 
instructions from the wiki on an Mac OS X system that has opencv and tesseract 
(+ other dependencies) installed.

What is the expected output? What do you see instead?

Upon running a test file:

import cv2.cv as cv
import tesseract

api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetPageSegMode(tesseract.PSM_AUTO)

image=cv.LoadImage("eurotext.jpg", cv.CV_LOAD_IMAGE_GRAYSCALE)
tesseract.SetCvImage(image)
text=api.GetUTF8Text()
conf=api.MeanTextConf()

The compiler produces an error indicating a missing method:
AttributeError: 'module' object has no attribute 'SetCvImage'

Therefore there's something wrong with the installation?

What version of the product are you using? On what operating system?

python-tesseract-0.8-1.7_20130612_.macosx-10.8-x86_64 on OS X 10.6.8 and Python 
2.7.5 with supposedly the correct dependencies installed.


Original issue reported on code.google.com by [email protected] on 29 Jun 2013 at 8:28

Install problem with tprintf.h:29:8: error: ‘TESS_API’ does not name a type

The problem 
$ python setup.py build
Current Version : only
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running build
running build_py
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include/leptonica -o 
tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/publictypes.h:73: Warning 462: Unable to set 
dimensionless array variable
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG 
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I. 
-I/usr/include/tesseract -I/usr/include/leptonica -I/usr/include/python2.7 -c 
tesseract_wrap.cpp -o build/temp.linux-x86_64-2.7/tesseract_wrap.o
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG 
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I. 
-I/usr/include/tesseract -I/usr/include/leptonica -I/usr/include/python2.7 -c 
main_dummy.cpp -o build/temp.linux-x86_64-2.7/main_dummy.o
In file included from /usr/include/python2.7/Python.h:8:0,
                 from config.h:8,
                 from main_dummy.cpp:9:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined 
[enabled by default]
In file included from /usr/include/assert.h:37:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from /usr/include/opencv/cv.h:63,
                 from config.h:7,
                 from main_dummy.cpp:9:
/usr/include/features.h:164:0: note: this is the location of the previous 
definition
In file included from /usr/include/python2.7/Python.h:8:0,
                 from config.h:8,
                 from main_dummy.cpp:9:
/usr/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined 
[enabled by default]
In file included from /usr/include/assert.h:37:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from /usr/include/opencv/cv.h:63,
                 from config.h:7,
                 from main_dummy.cpp:9:
/usr/include/features.h:166:0: note: this is the location of the previous 
definition
In file included from main_dummy.cpp:22:0:
tprintf.h:29:8: error: ‘TESS_API’ does not name a type
main_dummy.cpp: In function ‘int readBuf(const char*, l_uint8*)’:
main_dummy.cpp:54:21: warning: ignoring return value of ‘size_t fread(void*, 
size_t, size_t, FILE*)’, declared with attribute warn_unused_result 
[-Wunused-result]
error: command 'gcc' failed with exit status 1

$ tesseract --version
tesseract 3.02
 leptonica-1.68
  libgif 4.1.6 : libjpeg 8b : libpng 1.5.10 : libtiff 4.0.1 : zlib 1.2.7

Linux distro - 3.3.4-2-ARCH

Thanks for any suggestion.

Original issue reported on code.google.com by [email protected] on 10 May 2012 at 2:34

python-tesseract not returning same results as command line tesseract

What steps will reproduce the problem?
1. Perform OCR on the attached image with command line tesseract (tesseract 
3.png 3 && more 3.txt)
2. Perform OCR on the attached image with python-tesseract
3. Notice the errors thrown from python-tesseract 

What is the expected output? What do you see instead?
On certain images the results I'm seeing from python-tesseract are not exactly 
same as the results from command line tesseract on the same image. 
Additionally, some images (like the one installed) throw errors when 
python-tesseract performs OCR on them. Even though the result is same for this 
image from command line tesseract and python-tesseract. 

In my script this option returns False "print 
"HAVE_LIBLEPT=",tesseract.isLibLept()" I am assuming maybe this is why the 
results are different? 

What version of the product are you using? On what operating system?
$ tesseract --version
tesseract 3.02.02
 leptonica-1.69
  libjpeg 8d : libpng 1.5.14 : libtiff 4.0.3 : zlib 1.2.5

Please provide any additional information below.

I have searched google for this but have not found anything. My question is 
simply that should tesseract.isLibLept() be returning True for python-tesseract 
to return exactly the same results as the command line?

My script is like this:

api = tesseract.TessBaseAPI()
api.SetOutputName("outputName");
print "HAVE_LIBLEPT=",tesseract.isLibLept()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetPageSegMode(tesseract.PSM_AUTO)

Original issue reported on code.google.com by [email protected] on 14 Oct 2013 at 3:33

Attachments:

the program crashed sometimes in win vista

What steps will reproduce the problem?
1. install the py-tesseract lib
2. copy the sample
3. run

What is the expected output? What do you see instead?
it works sometimes. but it crashed most times.
"A problem caused the program to stop working correctly. Please close the 
program."

What version of the product are you using? On what operating system?
python-tesseract-0.7.6.win32-py2.7.exe
my os is win vista.

Please provide any additional information below.

it seems an issue which related to memory leak.
did we make a clean up in the back ground?

code:

import tesseract

api = tesseract.TessBaseAPI()
api.Init(".", "eng", tesseract.OEM_DEFAULT)
api.SetVariable("tessedit_char_whitelist", "0123456789")
api.SetPageSegMode(tesseract.PSM_AUTO)
print tesseract.ProcessPagesWrapper('rand.png',api)

Original issue reported on code.google.com by [email protected] on 6 Oct 2012 at 2:56

Build fails

What steps will reproduce the problem?
1. Clone python-tesseract repository
2. python config.py
3. python setup.py build

I expect that C++ sources will be build, but instead what I see is:

include path=/usr/include
Current Version : 0.7
running build
running build_py
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include 
-I/usr/include/leptonica -o tesseract_wrap.cpp tesseract.i
tesseract.i:11: Error: Unable to find 'publictypes.h'
tesseract.i:12: Error: Unable to find 'thresholder.h'
tesseract.i:13: Error: Unable to find 'baseapi.h'
error: command 'swig' failed with exit status 1

I am using Ubuntu 11.10, Python 2.7 and the last sources from the repository

As I found out it was because leptonica and tesseract headers were in 
/usr/local/include instead of /usr/include.
To fix this problem I made few changes to setup.py script and made a patch that 
fixed the problem.
I've attached patch to this issue.


Original issue reported on code.google.com by [email protected] on 16 Mar 2012 at 8:09

Attachments:

deb packages depend on leptonica, not libleptonica

On a clean Ubuntu install, follow the steps here doesn't work:
http://code.google.com/p/python-tesseract/wiki/HowToInstallPythonTesseractDeb

the error is:
 tesseract-ocr depends on leptonica; however:
  Package leptonica is not installed.


One option to fix is using the nutznboltz ppa that provides leptonica, but not 
for 11.10 oneiric and also the leptonica in oneiric itself is 1.68 already.

Workaround:
sudo apt-get install libleptonica
sudo dpkg -i --ignore-depends=leptonica /tmp/tesseract*.deb 
/tmp/python-tesseract_0.7-1.1_amd64.deb

This works just fine. Please change the dependency on leptonica to libleptonica.

Original issue reported on code.google.com by [email protected] on 21 Feb 2012 at 1:40

Installed to custom prefix, can't import tesseract module

I am running on a redhat system where I do no have admin priviledges or 
priviledges to write to /usr/local.  Instead, I have recreated the /usr 
directory structure under /foo/bar/usr where /foo/bar is a directory i have 
full rwx priviledges.  I had to build and install from source python 2.7.3 and 
swig 2.0.8 to the /foo/bar/usr.  Then I repeated these steps for tesseract and 
its dependencies.  Then after getting python-tesseract to build and install, I 
can't successfully import the tesseract module.  The output I get is:

The output I get is as follows:

>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "tesseract.py", line 18, in swig_import_helper
    import _tesseract
ImportError: libtesseract.so.3: cannot open shared object file: No such file or 
directory

Here are the steps I followed:
1. mkdir /foo/bar/usr/local
2. set environment variables with
export CFLAGS=-I/foo/bar/usr/local/include; export 
LDFLAGS=-L/foo/bar/usr/local/lib; export 
LIBLEPT_HEADERSDIR=/foo/bar/usr/local/include
3. Compile and install jpeg-8d, giflib-4.1.6, libpng-1.5.13, tiff-4.0.0, 
zlib-1.2.7, and leptonica-1.69 using this command for each library:
./configure --prefix=/foo/bar/usr/local; make; make install;
4. install python 2.7.3 from source to /foo/bar/usr/local:
./configure --prefix=/foo/bar/usr/local; make; make install;
5. grab tesseract-ocr-read-only from svn compile and install:
./configure --prefix=/foo/bar/usr/local; make; make install;
6. copy tesseract-ocr-read-only/ccutil/tprintf.h to /foo/bar/usr/local/include
7. svn checkout http://python-tesseract.googlecode.com/svn/trunk 
python-tesseract
8. cd python-tesseract
9. modify lines 99 & 100:
incls = ['/usr/include', '/usr/local/include', '/foo/bar/usr/local/include']
libs=['/usr/lib', '/usr/local/lib', '/foo/bar/user-supported/usr/local/lib']
10. build and install python-tesseract running:
python config.py;
python setup.py clean;
python setup.py build;
python setup.py install --prefix=/foo/bar/usr/local

11. Enter python prompt and import tesseract.

The output I get is as follows:

>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "tesseract.py", line 18, in swig_import_helper
    import _tesseract
ImportError: libtesseract.so.3: cannot open shared object file: No such file or 
directory


My python-tesseract build output is as follows:
os=linux
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept']===========
aaaaaaaaaaaaaaaaaaaaaaaaaaa
['.', '/foo/bar/usr/local/include/tesseract', 
'/foo/bar/usr/local/include/leptonica', '/usr/local/include/opencv']
running clean
os=linux
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept']===========
aaaaaaaaaaaaaaaaaaaaaaaaaaa
['.', '/foo/bar/usr/local/include/tesseract', 
'/foo/bar/usr/local/include/leptonica', '/usr/local/include/opencv']
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/foo/bar/usr/local/include/tesseract 
-I/foo/bar/usr/local/include/leptonica -o tesseract_wrap.cpp tesseract.i
/foo/bar/usr/local/include/tesseract/publictypes.h:78: Warning 462: Unable to 
set dimensionless array variable
creating build/temp.linux-x86_64-2.7
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/foo/bar/usr/local/include -fPIC -I. -I/foo/bar/usr/local/include/tesseract 
-I/foo/bar/usr/local/include/leptonica -I/usr/local/include/opencv 
-I/foo/bar/usr/local/include/python2.7 -c tesseract_wrap.cpp -o 
build/temp.linux-x86_64-2.7/tesseract_wrap.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
tesseract_wrap.cpp: In function âid 
SWIG_InitializeModule(void*)âtesseract_wrap.cpp:6675: warning: statement has 
no effect
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/foo/bar/usr/local/include -fPIC -I. -I/foo/bar/usr/local/include/tesseract 
-I/foo/bar/usr/local/include/leptonica -I/usr/local/include/opencv 
-I/foo/bar/usr/local/include/python2.7 -c main_dummy.cpp -o 
build/temp.linux-x86_64-2.7/main_dummy.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
main_dummy.cpp: In function âar* ProcessPagesRaw(const char*, 
tesseract::TessBaseAPI*)âmain_dummy.cpp:129: warning: address of local 
variable âgâeturned
main_dummy.cpp: At global scope:
main_dummy.cpp:196: warning: âlimage_Typeâefined but not used
main_dummy.cpp:203: warning: ât is_none(PyObject*)âefined but not used
g++ -pthread -shared -L/cliphomes/gtg426r/local/lib -L/foo/bar/usr/local/lib 
-I/foo/bar/usr/local/include build/temp.linux-x86_64-2.7/tesseract_wrap.o 
build/temp.linux-x86_64-2.7/main_dummy.o -lstdc++ -ltesseract -llept -o 
build/lib.linux-x86_64-2.7/_tesseract.so
os=linux
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept']===========
aaaaaaaaaaaaaaaaaaaaaaaaaaa
['.', '/foo/bar/usr/local/include/tesseract', 
'/foo/bar/usr/local/include/leptonica', '/usr/local/include/opencv']
running install
running bdist_egg
running egg_info
writing python_tesseract.egg-info/PKG-INFO
writing top-level names to python_tesseract.egg-info/top_level.txt
writing dependency_links to python_tesseract.egg-info/dependency_links.txt
writing manifest file 'python_tesseract.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/tesseract.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_tesseract.so -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/tesseract.py to tesseract.pyc
creating stub loader for _tesseract.so
byte-compiling build/bdist.linux-x86_64/egg/_tesseract.py to _tesseract.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/PKG-INFO -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/SOURCES.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/dependency_links.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/top_level.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
tesseract: module references __file__
creating dist
creating 'dist/python_tesseract-tesseract-py2.7-linux-x86_64.egg' and adding 
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing python_tesseract-tesseract-py2.7-linux-x86_64.egg
removing 
'/foo/bar/usr/local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7
-linux-x86_64.egg' (and everything under it)
creating 
/foo/bar/usr/local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-
linux-x86_64.egg
Extracting python_tesseract-tesseract-py2.7-linux-x86_64.egg to 
/foo/bar/usr/local/lib/python2.7/site-packages
python-tesseract tesseract is already the active version in easy-install.pth

Installed 
/foo/bar/usr/local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-
linux-x86_64.egg
Processing dependencies for python-tesseract==tesseract
Finished processing dependencies for python-tesseract==tesseract

Original issue reported on code.google.com by [email protected] on 16 Nov 2012 at 5:56

Build fails on Ubuntu 11.10 AMD64 (opencv/cv.h: No such file or directory)

What steps will reproduce the problem?
1. Attempt to build from python-tesseract-0.7.2 from SVN on Ubuntu 11.10

What is the expected output? What do you see instead?

python setup.py build
include path=/usr/include
Current Version : 0.7.2
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include 
-I/usr/include/leptonica -o tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/publictypes.h:78: Warning(462): Unable to set 
dimensionless array variable
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -I. -I/usr/include/tesseract -I/usr/include 
-I/usr/include/leptonica -I/usr/include/python2.7 -c tesseract_wrap.cpp -o 
build/temp.linux-x86_64-2.7/tesseract_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
Ada/C/ObjC but not for C++ [enabled by default]
In file included from tesseract_wrap.cpp:2822:0:
main_dummy.h:1:23: fatal error: opencv/cv.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
petert@alertpay-dev-20:~/Downloads/tesseract/python-tesseract-read-only/python-t
esseract-0.7.2$ 

What version of the product are you using? On what operating system?

python-tesseract-0.7.2 from SVN 
Ubuntu 11.10 AMD64 (3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 
x86_64 x86_64 x86_64 GNU/Linux)

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 19 Apr 2012 at 8:29

dpkg install fails on dependency problem

What steps will reproduce the problem?
1. dpkg -i -D python-tesseract_0.6-1_i386.deb
2.
3.

What is the expected output? What do you see instead?
expect: the dpkg message that python-tesseract is installed

instead: u
npacking python-tesseract (from python-tesseract_0.6-1_i386.deb) ...
dpkg: dependency problems prevent configuration of python-tesseract:
 python-tesseract depends on leptonica; however:
  Package leptonica is not installed.
dpkg: error processing python-tesseract (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-tesseract


What version of the product are you using? On what operating system?

python-tesseract 0.6.1

I use Ubuntu 11.04.
I did install libleptonica and leptonica-progs

(that's all i can find: 
http://packages.ubuntu.com/search?suite=default&section=all&arch=any&searchon=na
mes&keywords=leptonica )


Please provide any additional information below.
I've installed tesseract 2.04-2.1

Original issue reported on code.google.com by [email protected] on 31 Aug 2011 at 8:16

Can't install last deb file

What steps will reproduce the problem?
1. sudo dpkg -i python-tesseract_0.8-1.5_i386.deb
2.
dpkg: error processing python-tesseract_0.8-1.5_i386.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 python-tesseract_0.8-1.5_i386.deb

What is the expected output? What do you see instead?
python-tesseract should install. It does not.

What version of the product are you using? On what operating system?
0.8-1.5

Please provide any additional information below.
I am on Ubuntu 12.04. Installed libleptonica-dev


Original issue reported on code.google.com by [email protected] on 12 Jan 2013 at 7:39

main_dummy.cpp does not compile on mac

What steps will reproduce the problem?

try to compile python-tesseract on Mac


What is the expected output? What do you see instead?

I expected _tesseract.so to get compiled.
make cancelled with error:

main_dummy.cpp:45: error: 'class tesseract::TessBaseAPI' has no member named 
'ProcessPages'

What did I do wrong?


What version of the product are you using? On what operating system?

tesseract 3.0, svn checkout python-tesseract 24.6.2011

Is there a Mailinglist that I missed? Any connections to pytesser?

Original issue reported on code.google.com by [email protected] on 24 Jun 2011 at 4:47

Docstrings

Hi,

I generated docstrings from latest tesseract "baseapi.h" in tesseract.py

I attached "baseapi.xml" file regexed from "baseapi.h" and "tesseract.py" with 
docstrings.

Line endings are '\r\n' if anyone is concerned.


Cheers

Original issue reported on code.google.com by [email protected] on 21 Sep 2012 at 4:25

Attachments:

Tesseract DLL failed

Steps to reproduce:
1. Install Python 2.7.3 on Windows 7 x64
2. Install python-tesseract-0.7.4.win32-py2.7.exe (as administrator)
3. Start python shell and `import tesseract`

The command line returns:
>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "C:\Python27\lib\site-packages\tesseract.py", line 22, in swig_import_hel
per
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.

I thought that the windows package is supposed to include a build of tesseract. 
 I haven't been able to find a tesseract.dll on my PC after installation, but 
may be looking for the wrong thing.

Original issue reported on code.google.com by [email protected] on 1 May 2012 at 12:12

Unable to Run without Crashing from Spyder/Winpython

What steps will reproduce the problem?
1.Install winpython, tesseract, opencv, and pyhon-tesseract
2.Launch Spyder
3.Execute examples 1,2, or 3. 

What is the expected output? What do you see instead?

crashes at "result = tesseract.ProcessPagesBuffer(mBuffer,len(mBuffer),api)"
or
"tesseract.SetCvImage(image,api)"


What version of the product are you using? On what operating system?
Windows 7 64bit
python-tesseract_0.8-1.7.win32-py2.7.exe
tesseract-ocr-3.02.02

Spyder 2.2.0 internal shell on Python 2.7.5 32bits [Windows]
in both interpreters 
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on 
win32 
and
IPython 0.13.2

Please provide any additional information below.
I have tried as many combinations of settings as I could think of to avoid the 
suggested crash without setting "compatible to windows 7" and unbuffered "-u" 
flag.

I have set for python.exe and pythonw.exe in 
"C:\WinPython-32bit-2.7.5.0\python-2.7.5" compatible to windows 7 and XP 
Service Pack 3, also for Spyder.exe

I have edited to python.bat include "-u". I have tried the same for spyder.bat 
but spyder will hang on start.

I have added an environmental variable PYTHONUNBUFFERED

I have tried unbuffered calls suggested at 
http://stackoverflow.com/questions/881696/unbuffered-stdout-in-python-as-in-pyth
on-u-from-within-the-program

In terms of developing an app, I desperately need a solution that I can use 
from the interpreter. Has anyone got this running?





Original issue reported on code.google.com by [email protected] on 6 Jun 2013 at 8:46

import tesseract fails with '_tesseract.so: undefined symbol: pixDestroy'

What steps will reproduce the problem?
1. install tesseract and python-tesseract from source (static build)
2. start python interpeter
3. import tesseract

What is the expected output? What do you see instead?
expected: the import of (python-)tesseract

instead:
Traceback (most recent call last):
  File "./tesseract-tst.py", line 5, in <module>
    import tesseract
  File "/usr/local/lib/python2.7/dist-packages/tesseract.py", line 25, in <module>
    _tesseract = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/tesseract.py", line 21, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: /usr/local/lib/python2.7/dist-packages/_tesseract.so: undefined 
symbol: pixDestroy


What version of the product are you using? On what operating system?
svn builds (tesseract an python-tesseract)
Ubuntu 11.04

Please provide any additional information below.
thesseract did not build proppperly. 
I made libtesseract_la_OBJECTS empty.
Tesseract did compile now. And it seems to work. (it fixed issue 5)

Original issue reported on code.google.com by [email protected] on 13 Sep 2011 at 1:22

test.py fails trying to load wrong version of libopencv_stitching

What steps will reproduce the problem?
1. Follow steps in wiki article How to compile python-tesseract (for Mac 
Mountain Lion)
2. Run tests in final step - python test.py

What is the expected output? What do you see instead?
Expect the tests to pass. Test fails with following error:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    import tesseract
  File "/usr/local/lib/python2.7/site-packages/tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "/usr/local/lib/python2.7/site-packages/tesseract.py", line 22, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/_tesseract.so, 2): 
Library not loaded: /usr/local/lib/libopencv_stitching.2.4.4.dylib
  Referenced from: /usr/local/lib/python2.7/site-packages/_tesseract.so
  Reason: image not found

What version of the product are you using? On what operating system?
Mac 10.8.4

Please provide any additional information below.
It looks like I have a newer version of opencv installed.

$ brew list opencv
/usr/local/Cellar/opencv/2.4.5/bin/opencv_traincascade
/usr/local/Cellar/opencv/2.4.5/bin/opencv_performance
/usr/local/Cellar/opencv/2.4.5/bin/opencv_haartraining
/usr/local/Cellar/opencv/2.4.5/bin/opencv_createsamples
/usr/local/Cellar/opencv/2.4.5/include/opencv/ (11 files)
/usr/local/Cellar/opencv/2.4.5/include/opencv2/ (148 files)
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_calib3d.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_contrib.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_core.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_features2d.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_flann.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_gpu.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_highgui.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_imgproc.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_legacy.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_ml.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_nonfree.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_objdetect.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_ocl.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_photo.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_stitching.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_superres.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_ts.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_video.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/libopencv_videostab.2.4.5.dylib
/usr/local/Cellar/opencv/2.4.5/lib/pkgconfig/opencv.pc
/usr/local/Cellar/opencv/2.4.5/lib/python2.7/ (2 files)
/usr/local/Cellar/opencv/2.4.5/lib/ (38 other files)
/usr/local/Cellar/opencv/2.4.5/share/OpenCV/ (29 files)

Original issue reported on code.google.com by [email protected] on 9 Jun 2013 at 5:58

Cannot build python tesseract on ubuntu 11.10

What steps will reproduce the problem?
Building latest python-tesseract

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
Ubuntu 11.10 64bit, Tesseract 3.0.1, python-tesseract 6.1

Please provide any additional information below.

I build tesseract-ocr from google (http://code.google.com/p/tesseract-ocr). 
tesseract is working (I followed their installation instruction though from 
http://code.google.com/p/tesseract-ocr/wiki/ReadMe). When I try to build 
python-tesseract:

python setup.py build

I got: 
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions 
build/temp.linux-x86_64-2.7/tesseract_wrap.o 
build/temp.linux-x86_64-2.7/main_dummy.o -ltesseract_api -o 
build/lib.linux-x86_64-2.7/_tesseract.so
/usr/bin/ld: cannot find -ltesseract_api
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

Command "ls -al /usr/lib | greb tesseract_api" though can find it:
lrwxrwxrwx   1 root root           25 2011-09-12 05:47 libtesseract_api.so -> 
libtesseract_api.so.3.0.1

However, command "ldd /usr/lib/libtesseract_api.so" shows
ldd: /usr/lib/libtesseract_api.so: No such file or directory


I also tried to used deb package for 11.04 build I got:
dpkg: dependency problems prevent configuration of python-tesseract:
 python-tesseract depends on leptonica; however:
  Package leptonica is not installed.

Even though I have installed libleptonica (version 1.68-4 - does the lib prefix 
makes a difference?), libleptonica-dev and leptonica-progs





Original issue reported on code.google.com by [email protected] on 4 Dec 2011 at 2:31

Installing and running on win32

What steps will reproduce the problem?
1. Fresh install of python 2.7
2. install using win32 installer
3. install numpy using win32 installer
4. attempt to run sample code
5. failure to open ./tessdata/eng.traineddata
6. Attempt to locate tessdata folder
7. unable to find tessdata folder

What is the expected output? What do you see instead?
Leaving aside that the installer does not list any dependencies on numpy, it is 
incomplete as it does not include enough components to run "out of the box". 

This may just be a documentation issue.

What version of the product are you using? On what operating system?
Python 2.7.1 win32
python tesseract 0.7.5

Please provide any additional information below.
I eventually found tessdata inside the tess-slim download. It's apparently 
something the tesseract-ocr looks for, which should be stated in the 
documentation.

Original issue reported on code.google.com by [email protected] on 13 Aug 2012 at 3:36

/usr/bin/ld: cannot find -ltesseract_api

I install leptonica from source.

http://www.leptonica.org/download.html

When I try : python setup.py build

I got the following error. 

/usr/bin/ld: cannot find -ltesseract_api

How do I export ?

Please help me.

Original issue reported on code.google.com by [email protected] on 15 Dec 2011 at 6:44

Code review request

Branch name:

Purpose of code changes on this branch:


When reviewing my code changes, please focus on:


After the review, I'll merge this branch into:
/trunk


Original issue reported on code.google.com by [email protected] on 14 Aug 2012 at 6:07

OCR fails on assertion in tesseract

What steps will reproduce the problem?
1. OCR the attached file
2.
3.

What is the expected output? What do you see instead?
expected: a succesfull operation

instead:  python: intmatcher.cpp:1165: int 
IntegerMatcher::FindBestMatch(INT_CLASS_STRUCT*, const ScratchEvidence&, 
uinT16, uinT8, INT_RESULT_STRUCT*): Assertion `ClassTemplate->NumConfigs > 0' 
failed.


What version of the product are you using? On what operating system?
Ubuntu 11.04
tesseract 3.0.0+svn581-1


Please provide any additional information below.
I'm experiencing an error as described in
http://code.google.com/p/tesseract-ocr/issues/detail?id=504&can=1&q=intmatcher.c
pp%201165%20int%20IntegerMatcher%20FindBestMatch

The issue claims it is fixed in 3.01

Is there an indication when 3.01 will be available in the repository at  
ppa:nutznboltz/tesseract ?

Regards,
Gert-Jan Braas


Original issue reported on code.google.com by [email protected] on 7 Sep 2011 at 5:19

Attachments:

api.GetHocrText() returns malformed XML

Control characters are inserted into the document, and XML parsers cannot 
handle it without first trying to strip them out. This problem was reportedly 
fixed in the main tesseract SVN a few days ago, and I think producing an update 
linked with SVN will fix it.

Using Python 2.7.3 under Windows 7 X64.

P.S. Are there any instructions for building from SVN with VS 2008? I see the 
binary under downloads but there's no information as for how it was generated. 
Just libtesseract et al wrapped with swig?

Original issue reported on code.google.com by [email protected] on 9 Aug 2012 at 2:27

ImportError: /usr/lib/pymodules/python2.7/_tesseract.so: undefined symbol: kPolyBlockNames

Installed both tesseract deb packages then python wrapper (all 32bit) on Ubuntu 
11.04:

>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/tesseract.py", line 25, in <module>
    _tesseract = swig_import_helper()
  File "/usr/lib/pymodules/python2.7/tesseract.py", line 21, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: /usr/lib/pymodules/python2.7/_tesseract.so: undefined symbol: 
kPolyBlockNames


Original issue reported on code.google.com by [email protected] on 7 Oct 2011 at 12:32

Segmentation fault on "Empty page!!" errors

What steps will reproduce the problem?
1. Process a bunch of images.
2. Suddenly:
> Empty Page!!
> Segmentation Fault (core dumped)

Happens pretty randomly, I would guess 1/200 probability. Images get processed 
just fine on retry.


What is the expected output? What do you see instead?
It would be great if I just got a Python exception and could retry processing. 
Instead the whole program crashes and I have to start from beginning.

What version of the product are you using? On what operating system?
I'm using: python-tesseract_0.8-1.6_amd64.deb

Ubuntu 12.10 64-bit
tesseract-ocr 3.02.01-6
liblept3 1.69-3.1ubuntu1
libtesseract3 3.02.01-6 

Please provide any additional information below.

GDB backtrace:

Empty page!!

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7046c01 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) backtrace
#0  0x00007ffff7046c01 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff61d072b in retParser(char const*) () from 
/usr/lib/pymodules/python2.7/_tesseract.so
#2  0x00007ffff61d0a35 in ProcessPagesBuffer(char*, int, 
tesseract::TessBaseAPI*) () from /usr/lib/pymodules/python2.7/_tesseract.so
#3  0x00007ffff61cf29d in ?? () from /usr/lib/pymodules/python2.7/_tesseract.so
#4  0x000000000045f912 in PyEval_EvalFrameEx ()
#5  0x0000000000467209 in PyEval_EvalCodeEx ()
#6  0x00000000004d0242 in PyEval_EvalCode ()
#7  0x00000000005102bb in ?? ()
#8  0x000000000044a466 in PyRun_FileExFlags ()
#9  0x000000000044a97a in PyRun_SimpleFileExFlags ()
#10 0x000000000044b6bc in Py_Main ()
#11 0x00007ffff6f0576d in __libc_start_main () from 
/lib/x86_64-linux-gnu/libc.so.6
#12 0x00000000004ce0ad in _start ()


Original issue reported on code.google.com by [email protected] on 22 Mar 2013 at 3:58

Build error on Max OSX Lion

I am trying to build python-tesseract 0.7 (I have tried the latest from the svn 
as well) and I keep getting this error when running: python setup.py build

swig -python -c++ -I/usr/local/include/tesseract -I/usr/local/include 
-I/usr/local/include/leptonica -o tesseract_wrap.cpp tesseract.i
/usr/local/include/tesseract/publictypes.h:78: Warning 462: Unable to set 
dimensionless array variable
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common 
-fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG 
-Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall 
-Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I. 
-I/usr/local/include/tesseract -I/usr/local/include 
-I/usr/local/include/leptonica 
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
tesseract_wrap.cpp -o build/temp.macosx-10.7-intel-2.7/tesseract_wrap.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
tesseract_wrap.cpp: In function ‘int Swig_var_TessBaseAPI_set(PyObject*)’:
tesseract_wrap.cpp:4110: error: ‘temp’ was not declared in this scope
tesseract_wrap.cpp:4111: error: expected type-specifier before ‘*’ token
tesseract_wrap.cpp:4111: error: expected `>' before ‘*’ token
tesseract_wrap.cpp:4111: error: expected `(' before ‘*’ token
tesseract_wrap.cpp:4111: error: expected primary-expression before ‘>’ token
tesseract_wrap.cpp:4111: error: expected `)' before ‘;’ token
tesseract_wrap.cpp:4112: error: expected unqualified-id before ‘=’ token
tesseract_wrap.cpp:4113: error: type ‘<type error>’ argument given to 
‘delete’, expected pointer
tesseract_wrap.cpp: In function ‘PyObject* Swig_var_TessBaseAPI_get()’:
tesseract_wrap.cpp:4125: error: expected primary-expression before ‘)’ token
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
In file included from /usr/local/include/tesseract/genericvector.h:28,
                 from /usr/local/include/tesseract/params.h:25,
                 from /usr/local/include/tesseract/unicharset.h:27,
                 from /usr/local/include/tesseract/ltrresultiterator.h:26,
                 from /usr/local/include/tesseract/resultiterator.h:26,
                 from /usr/local/include/tesseract/baseapi.h:34,
                 from tesseract_wrap.cpp:3068:
/usr/local/include/tesseract/helpers.h: In function ‘void 
chomp_string(char*)’:
/usr/local/include/tesseract/helpers.h:33: warning: implicit conversion 
shortens 64-bit value into a 32-bit value
tesseract_wrap.cpp: In function ‘int Swig_var_TessBaseAPI_set(PyObject*)’:
tesseract_wrap.cpp:4110: error: ‘temp’ was not declared in this scope
tesseract_wrap.cpp:4111: error: expected type-specifier before ‘*’ token
tesseract_wrap.cpp:4111: error: expected `>' before ‘*’ token
tesseract_wrap.cpp:4111: error: expected `(' before ‘*’ token
tesseract_wrap.cpp:4111: error: expected primary-expression before ‘>’ token
tesseract_wrap.cpp:4111: error: expected `)' before ‘;’ token
tesseract_wrap.cpp:4112: error: expected unqualified-id before ‘=’ token
tesseract_wrap.cpp:4113: error: type ‘<type error>’ argument given to 
‘delete’, expected pointer
tesseract_wrap.cpp: In function ‘PyObject* Swig_var_TessBaseAPI_get()’:
tesseract_wrap.cpp:4125: error: expected primary-expression before ‘)’ token
lipo: can't open input file: 
/var/folders/2y/khg_v_hn6qqfpzsf1jzq6qsw0000gn/T//ccH9hiKT.out (No such file or 
directory)
error: command 'llvm-gcc-4.2' failed with exit status 1



Original issue reported on code.google.com by [email protected] on 28 May 2012 at 3:25

Always crashes when doing OCR step

What steps will reproduce the problem?
1. installed python-tesseract 0.7.6 win32 bundled with tesseract (Aug 14 
release) on Win XP with Python 2.7.  
2. Initially had DLL load problems but fixed them by moving the files mentioned 
here: http://code.google.com/p/python-tesseract/issues/detail?id=31
3. run either example script and python crashes with no error message.  (first 
example crashes on tesseract.ProcessPageBuffer and second example crashes on 
GetUTF8Text).

What is the expected output? What do you see instead?
Expect some kind of OCR output or even an error message.  Instead python 
crashes.  

Please provide any additional information below.
Stepping through in the debugger seems to put the source of the fatal error in 
_tesseract.pyd


Original issue reported on code.google.com by [email protected] on 14 Jan 2013 at 7:58

README.1ST

Could you be so kind to write couple of lines how to compile this thing?

Making only 64bit debs is silly

==========
swig -python -c++ -I/usr/include/tesseract/ -I/usr/include 
-I/usr/include/leptonica -o tesseract_wrap.cpp tesseract.i
----------

You could check "/usr/local/include/" also

Original issue reported on code.google.com by [email protected] on 13 Jul 2011 at 10:30

api.GetIteration usage differs from original implementation

I'm using trunk. I wish to iterate through the document by paragraph, and the 
Tesseract GetIteration function expects a single argument: the document "level" 
(word, paragraph, block, etc..) However, python-tesseract does not expect/allow 
any parameters for api.GetIterator, and there are no examples of iteration that 
might explain how to accomplish this.

Additionally, I have searched the sourcecode for "PageIteratorLevel" (the enum 
type for the document levels), "RIL_PARA" (the specific level that I'm 
interested in), as well as "GetIterator" itself, but nothing that I found 
seemed useful.

Original issue reported on code.google.com by [email protected] on 9 Nov 2013 at 7:54

Enhancement - Set OpenCV Image

For our project we need to combine OpenCV library and tesseract python 
bindings. So it seems more effective to set OpenCV image directly to tesseract 
instead of storing it into a file and let tesseract re-read it. 

Would it be possible to integrate following changes (included in the enclosed 
patch, the diff is made towards revision 95) into the python-tesseract project? 
I tested the patched changes under Ubuntu 11.04.

I also find out that shared tesseract library no longer names tesseract_api, so 
I also edited setup.py.



Original issue reported on code.google.com by [email protected] on 1 Nov 2011 at 1:37

Attachments:

Calls of the form tesseract.XXXX(*args,api) crash Python 2.7

What steps will reproduce the problem?
1. Each of the 3 examples listed in Project Home result in IDLE crashing and 
requiring a shell restart
2. The error can be attributed to calls of the form tesseract.XXXX(*args,api) 
where api = tesseract.TessBaseAPI()

What is the expected output? What do you see instead?
Following the examples, I should see either the text output of the image 
supplied or the confidence values from the OCR algorithms.  Instead, I see the 
crash popup pictured in the attachment.

What version of the product are you using? On what operating system?
Using Python 2.7 on Windows XP (SP3).  This issue has occurred with both 
version 0.7.5 and 0.8-1.6

Please provide any additional information below.
When I remove the aforementioned calls, the test programs run (without expected 
output of course).

Original issue reported on code.google.com by [email protected] on 27 Mar 2013 at 1:57

AppCrash after returning from interpreter

What steps will reproduce the problem?
1. Successfully Installed tesseract, python-tessearact, numpy, opencv
2. I am trying to run the code in Example2

What is the expected output? What do you see instead?
I ran the example for the attached sample file. The code is running smoothly 
but throwing appcrash error after exiting from the interpreter or after the 
execution of the python from the command line.

I digged a lil bit and found api.End() will actually produce the app crash.

What version of the product are you using? On what operating system?
Windows Server 2008
tesseract-ocr-setup-3.02.02.exe

Please provide any additional information below.

Can you please help me out with this issue

Original issue reported on code.google.com by [email protected] on 1 May 2013 at 12:02

Attachments:

Python-Tesseract debian Package error

Hi All,

        I am an open source software developer from Sri Lanka...
Now a days i am developing a Free and Open source Check Scanner Software for 
Ubuntu...
For that i need to configure Python-Tesseract on Ubuntu 11.10...
I tried so meny time to do it , But it giving an error like "leptonic 
dependancy is not satisfied" ...
But i alredy installed leptonica 1.67 ... but still giving the same error...

i think the problem in the debian package...

So please help me guys regarding this...


Operating system: Ubuntu 11.10

Original issue reported on code.google.com by [email protected] on 2 Dec 2011 at 10:12

test-slim doesn't work

Hi,

I installed python-tesseract on my CentOS 5.4 server following the wiki:
http://code.google.com/p/python-tesseract/wiki/HowToCompilePythonTesseractForCen
tos

When I tried to run 'test.py', the first two tests successed. However, the 
third test, 'ProcessPagesRaw', failed printing this message:

Test ProcessPagesRaw
Error in findFileFormatStream: truncated file
Error in pixReadStream: Unknown format: no pix returned
Error in pixGetDimensions: pix not defined
Error in pixGetColormap: pix not defined
Error in pixClone: pixs not defined
Error in pixGetDepth: pix not defined
Error in pixGetWpl: pix not defined
Error in pixGetYRes: pix not defined
Please call SetImage before attempting recognition.

When I tried to call 'ProcessPagesBuffer' in my python project, it gives the 
same error too. I think it's related to leptonica but I can't find the solution 
after almost one day straight down googling.

Now I am totally stuck. Please, any help would be greatly appreciated. Or are 
there ways to get around using 'ProcessPagesWraper' or 
'ProcessPagesFileStream', the first two functions called by 'test.py' which 
succeeded? Basically I need to parse an image from URL without saving it to the 
local drive, and the image format varies.

My setup:
CentOS 5.4, Python 2.6, leptonica 1.69, OpenCV 2.4.2.

Original issue reported on code.google.com by [email protected] on 10 Feb 2013 at 7:11

python-tesseract 0.7.4 on Archlinux: ImportError, undefined symbol

The problem:




$ python2
Python 2.7.3 (default, Apr 24 2012, 00:00:54) 
[GCC 4.7.0 20120414 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2.cv as cv
>>> import tesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/python_tesseract-0.7.4-py2.7-linux-x86_64.egg/tesseract.py", line 26, in <module>
    _tesseract = swig_import_helper()
  File "/usr/lib/python2.7/site-packages/python_tesseract-0.7.4-py2.7-linux-x86_64.egg/tesseract.py", line 22, in swig_import_helper
    _mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: 
/usr/lib/python2.7/site-packages/python_tesseract-0.7.4-py2.7-linux-x86_64.egg/_
tesseract.so: undefined symbol: 
_ZN9tesseract11TessBaseAPI18SetFillLatticeFuncEMNS_7WordrecEFvRK6MATRIXRKP8list_
recRK10UNICHARSETP12BlamerBundleE



The compilation output:



$ python2 config.py; python2 setup.py clean; python2 setup.py build; sudo 
python2 setup.py install)
Current Version : 0.7.4
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running clean
Current Version : 0.7.4
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include/leptonica -o 
tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/publictypes.h:73: Warning 462: Unable to set 
dimensionless array variable
creating build/temp.linux-x86_64-2.7
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 
-pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I. 
-I/usr/include/tesseract -I/usr/include/leptonica -I/usr/include/python2.7 -c 
tesseract_wrap.cpp -o build/temp.linux-x86_64-2.7/tesseract_wrap.o
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 
-pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I. 
-I/usr/include/tesseract -I/usr/include/leptonica -I/usr/include/python2.7 -c 
main_dummy.cpp -o build/temp.linux-x86_64-2.7/main_dummy.o
In file included from /usr/include/python2.7/Python.h:8:0,
                 from config.h:8,
                 from main_dummy.cpp:8:
/usr/include/python2.7/pyconfig.h:1161:0: attention : « _POSIX_C_SOURCE » 
redéfini [enabled by default]
In file included from /usr/include/assert.h:37:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from /usr/include/opencv/cv.h:63,
                 from config.h:7,
                 from main_dummy.cpp:8:
/usr/include/features.h:164:0: note: ceci est la localisation d'une 
précédente définition
In file included from /usr/include/python2.7/Python.h:8:0,
                 from config.h:8,
                 from main_dummy.cpp:8:
/usr/include/python2.7/pyconfig.h:1183:0: attention : « _XOPEN_SOURCE » 
redéfini [enabled by default]
In file included from /usr/include/assert.h:37:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from /usr/include/opencv/cv.h:63,
                 from config.h:7,
                 from main_dummy.cpp:8:
/usr/include/features.h:166:0: note: ceci est la localisation d'une 
précédente définition
main_dummy.cpp: In function ‘int readBuf(const char*, l_uint8*)’:
main_dummy.cpp:53:21: attention : ignoring return value of ‘size_t 
fread(void*, size_t, size_t, FILE*)’, declared with attribute 
warn_unused_result [-Wunused-result]
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 
-pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I. 
-I/usr/include/tesseract -I/usr/include/leptonica -I/usr/include/python2.7 -c 
fmemopen.c -o build/temp.linux-x86_64-2.7/fmemopen.o
g++ -pthread -shared 
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu 
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 
-D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-2.7/tesseract_wrap.o 
build/temp.linux-x86_64-2.7/main_dummy.o build/temp.linux-x86_64-2.7/fmemopen.o 
-L/usr/lib -lstdc++ -ltesseract -llept -lopencv_core -lpython2.7 -o 
build/lib.linux-x86_64-2.7/_tesseract.so
==> Entre dans l'environnement fakeroot…
==> Lancement de package()...
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded: 
ignored.
Current Version : 0.7.4
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running install
running bdist_egg
running egg_info
writing python_tesseract.egg-info/PKG-INFO
writing top-level names to python_tesseract.egg-info/top_level.txt
writing dependency_links to python_tesseract.egg-info/dependency_links.txt
unrecognized .svn/entries format in 
reading manifest file 'python_tesseract.egg-info/SOURCES.txt'
writing manifest file 'python_tesseract.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/tesseract.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_tesseract.so -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/tesseract.py to tesseract.pyc
creating stub loader for _tesseract.so
byte-compiling build/bdist.linux-x86_64/egg/_tesseract.py to _tesseract.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/PKG-INFO -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/SOURCES.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/dependency_links.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_tesseract.egg-info/top_level.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
tesseract: module references __file__
creating dist
creating 'dist/python_tesseract-0.7.4-py2.7-linux-x86_64.egg' and adding 
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing python_tesseract-0.7.4-py2.7-linux-x86_64.egg
creating 
/usr/lib/python2.7/site-packages/python_tesseract-0.7.4-py2.7-linux-x86_64.egg
Extracting python_tesseract-0.7.4-py2.7-linux-x86_64.egg to 
/usr/lib/python2.7/site-packages
Adding python-tesseract 0.7.4 to easy-install.pth file

Original issue reported on code.google.com by [email protected] on 2 May 2012 at 4:18

error running on tif file

When run on the attach file, eurotext.tif got the following error.

Error in fopenTiff: invalid file descriptor
Error in findTiffCompression: tif not opened
Error in pixReadStream: Unknown format: no pix returned
Error in pixGetDimensions: pix not defined
Error in pixGetColormap: pix not defined
Error in pixClone: pixs not defined
Error in pixGetDepth: pix not defined
Error in pixGetWpl: pix not defined
Error in pixGetYRes: pix not defined
Please call SetImage before attempting recognition.Segmentation fault

Original issue reported on code.google.com by [email protected] on 12 Dec 2011 at 6:19

Attachments:

what does it do ?

From your example, 
api.SetOutputName("outputName");

What is the purpose of this SetOutputName?

Original issue reported on code.google.com by [email protected] on 12 Dec 2011 at 3:02

Example 2 on the homepage crashes python

What steps will reproduce the problem?
1. Install python-tesseract using the Homebrws instructions
2. Run example 2 in the homepage


What is the expected output? What do you see instead?

Python crashes. This is the full report 
https://gist.github.com/giacecco/6371150 .


What version of the product are you using? On what operating system?

Everything latest at the moment of writing, clean install of Homebrew and 
python-tesseract.


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 28 Aug 2013 at 8:57

Patch to expose more functionalities

Hi there,

Here's a small patch that I think could be a nice addition.
It exposes tesseract's iterators to python, allowing to finer use of the result 
data.

To apply:
patch -p1 < tesseract.patch

Let me know if you have any issues :)


PS: please move to github ??? :)

Original issue reported on code.google.com by [email protected] on 24 Aug 2012 at 9:50

Attachments:

Build from trunk on Ubuntu 11.10: main_dummy.cpp:1:20: fatal error: mfcpch.h: No such file or directory compilation terminated.

What steps will reproduce the problem?
1. Attempt to build python-tesseract from trunk using instructions in wiki on 
Ubuntu 11.10 AMD64

What is the expected output? What do you see instead?

someone@somewhere:~/Downloads/tesseract/$ python setup.py clean
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running clean
someone@somewhere:~/Downloads/tesseract/$ python setup.py build
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include/leptonica -o 
tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/publictypes.h:78: Warning(462): Unable to set 
dimensionless array variable
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -I. -I/usr/include/tesseract -I/usr/include/leptonica 
-I/usr/include/python2.7 -c tesseract_wrap.cpp -o 
build/temp.linux-x86_64-2.7/tesseract_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -I. -I/usr/include/tesseract -I/usr/include/leptonica 
-I/usr/include/python2.7 -c main_dummy.cpp -o 
build/temp.linux-x86_64-2.7/main_dummy.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
Ada/C/ObjC but not for C++ [enabled by default]
main_dummy.cpp:1:20: fatal error: mfcpch.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

Please provide any additional information below.

If I'm not mistaken "mfcpch.h" is an M$ C++ header file ??? 

What version of the product are you using? On what operating system?

Original issue reported on code.google.com by [email protected] on 24 Apr 2012 at 8:55

Can't install on clean Ubuntu Precise

What steps will reproduce the problem?
1. Following these steps: 
http://code.google.com/p/python-tesseract/wiki/HowToInstallPythonTesseractDeb

What is the expected output? What do you see instead?
dpkg: dependency problems prevent configuration of python-tesseract:
 python-tesseract depends on python-support (>= 0.90.0); however:
  Package python-support is not installed.
 python-tesseract depends on liblibleptonica (>= 1.68); however:
  Package liblibleptonica is not installed.
 python-tesseract depends on libopencv-core2.3; however:
  Package libopencv-core2.3 is not installed.

What version of the product are you using? On what operating system?
0.7-1.4, on Ubuntu 12.0


Original issue reported on code.google.com by [email protected] on 7 Mar 2013 at 8:52

Problems with centos + python tesseract

What steps will reproduce the problem?
1.Install leptonica from source
2.Install tesseract from source (checkout from repo)
3.Install (altinstall) python2.7 along python2.4 in Centos 5.8 
_>Then do as follows:(includes output)

python2.7 config.py --prefix=/usr
OUTPUT:NOTHING
____________________________________________

running: python2.7 setup.py clean
OUTPUT:
os=linux
Current Version : only
===========['stdc++', 'tesseract', 'lept']===========
running clean
____________________________________________
running: python2.7 setup.py build
OUTPUT:
os=linux
Current Version : only
===========['stdc++', 'tesseract', 'lept']===========
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include/leptonica -o 
tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/publictypes.h:78: Warning 462: Unable to set 
dimensionless array variable
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -fPIC -I. -I/usr/include/tesseract -I/usr/include/leptonica 
-I/usr/local/include/python2.7 -c tesseract_wrap.cpp -o 
build/temp.linux-x86_64-2.7/tesseract_wrap.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -fPIC -I. -I/usr/include/tesseract -I/usr/include/leptonica 
-I/usr/local/include/python2.7 -c main_dummy.cpp -o 
build/temp.linux-x86_64-2.7/main_dummy.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
main_dummy.h:16: error: variable or field ‘SetCvImage’ declared void
main_dummy.h:16: error: ‘PyObject’ was not declared in this scope
main_dummy.h:16: error: ‘o’ was not declared in this scope
main_dummy.h:16: error: expected primary-expression before ‘*’ token
main_dummy.h:16: error: ‘api’ was not declared in this scope
main_dummy.h:16: error: initializer expression list treated as compound 
expression
main_dummy.cpp:171: error: ‘PyObject_HEAD’ does not name a type
main_dummy.cpp:173: error: ISO C++ forbids declaration of ‘PyObject’ with 
no type
main_dummy.cpp:173: error: expected ‘;’ before ‘*’ token
main_dummy.cpp:177: error: ‘PyTypeObject’ does not name a type
main_dummy.cpp:184: error: ‘PyObject’ was not declared in this scope
main_dummy.cpp:184: error: ‘o’ was not declared in this scope
main_dummy.cpp:185: error: expected ‘,’ or ‘;’ before ‘{’ token
main_dummy.cpp:190: error: ‘PyObject’ was not declared in this scope
main_dummy.cpp:190: error: ‘o’ was not declared in this scope
main_dummy.cpp:191: error: expected ‘,’ or ‘;’ before ‘{’ token
main_dummy.cpp:200: error: ‘PyObject’ was not declared in this scope
main_dummy.cpp:200: error: ‘o’ was not declared in this scope
main_dummy.cpp:200: error: ‘IplImage’ was not declared in this scope
main_dummy.cpp:200: error: ‘dst’ was not declared in this scope
main_dummy.cpp:200: error: initializer expression list treated as compound 
expression
main_dummy.cpp:201: error: expected ‘,’ or ‘;’ before ‘{’ token
main_dummy.cpp:184: warning: ‘is_none’ defined but not used
main_dummy.cpp:190: warning: ‘is_iplimage’ defined but not used
main_dummy.cpp:200: warning: ‘convert_to_IplImage’ defined but not used
error: command 'gcc' failed with exit status 1


What version of the product are you using? On what operating system?

Latest 0.7 , centos5.8
Please provide any additional information below.
The following line uses the correct directories 
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -fPIC -I. -I/usr/include/tesseract -I/usr/include/leptonica 
-I/usr/local/include/python2.7 -c main_dummy.cpp -o 
build/temp.linux-x86_64-2.7/main_dummy.o

I hope you can help, i didn't want to send a ticket cause I am guessing it's a 
pretty specific problem but i am going crazy with this setup right now so i 
need some help -and no, changing OS is not an option sadly)

Original issue reported on code.google.com by [email protected] on 7 Aug 2012 at 7:25

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.