can't start hocr-gtk

Bug #596820 reported by matanya
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
hocr (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

after installing hocr 0.10.17 form source I get this traceback:
Traceback (most recent call last):
  File "/usr/bin/hocr-gtk", line 34, in <module>
    from hocr import *
ImportError: No module named hocr

this is on ubuntu 10.4 64 bit.

I expected the program to start but it failed with this traceback.

Revision history for this message
Enrico Segre (enrico-segre) wrote :

I could start it in the following q&d way in Lucid Lynx:

after building libhocr-0.10.17 and sudo make install, hocr-gtk is located for me in /usr/local/bin, and hocr.py* lands in
/usr/local/lib/python2.6/site-packages.
I added the following two lines just before line 34 of /usr/local/bin/hocr-gtk

  sys.prefix='/usr/local'
  sys.path.append('/usr/local/lib/python2.6/site-packages')

then hocr-gtk runs, but it still has problems. On most of the images I tried to recognize, the gtk gui hangs at the end of phase 3, Font Recogntion. The command line hocr is perfectly able to cope with these images.

What I find strange about my fix is that python does not know about /site-packages. Indeed:

$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
'/usr'
>>>

I would have expected sys.prefix='/usr/local'. I don't know if that hints of a python installation problem, with further consequences on hocr-gtk.

Btw an alternative to hocr-gtk is http://code.google.com/p/qhocr/, though it is based on libhocr-0.10.16.

Revision history for this message
Lior Kaplan (kaplan) wrote :

Well, opening bugs on software you built yourself won't get a solution.

I'm working on packaging version 0.10.17 for Debian (and thus ubuntu) which will save you the trouble of self building the software.

Lior Kaplan (kaplan)
Changed in hocr (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.