jwilk-archive / ocrodjvu

OCR for DjVu
GNU General Public License v2.0
45 stars 19 forks source link

Version 0.7.18 does not start #11

Closed jwilk closed 10 years ago

jwilk commented 10 years ago

Issue reported by anonymous at Bitbucket:

Hi The new version of ocrodjvu does not start on my Ubuntu 14.04 machine. All I get is

Traceback (most recent call last):
  File "/usr/local/bin/ocrodjvu", line 5, in <module>
    from ocrodjvu.cli import ocrodjvu as _
ImportError: No module named ocrodjvu.cli

Version 0.7.17 works just fine. Any ideas about the error?

Thanks in advance Heinrich Schwietering

jwilk commented 10 years ago

Hmm, no, no ideas. I don't see anything that could cause such a regression in a diff between 0.7.17 and 0.17.8.

How exactly did you install the program?

Could you run:

#!sh
python -v /usr/local/bin/ocrodjvu --help 2>log

and include the log file here (or send it to me in a private mail)?

jwilk commented 10 years ago

The python -v wasn't as helpful as I hoped it would be. :-/ But I think I've figured out what happens here anyway.

It turns out that checkinstall and setup.py install don't play well together. If some Python modules are already installed, and they haven't changed, setup.py install will keep them without overwriting. But that means checkinstall won't see they belong to the newly-built package.

So ironically, the fact that almost nothing changed in the new ocrodjvu version contributed to the breakage.

I don't think there's much I can do on the ocrodjvu side. All I can do is to recommend removing the old package before installing the new one; or using python-stdeb instead, which should hopefully be more robust.

jwilk commented 10 years ago

Comment submitted by heinrich_schwietering at Bitbucket:

Ok, seems weird, never encountered anything like that in in all those years of using checkinstall...

I solved it by removing the first checkinstall package and than using

sudo checkinstall pip install ocrodjvu

ocrodjvu work ok, and I could remove it via apt or dpkg if need be. Thanks for your hint!

jwilk commented 10 years ago

Comment submitted by heinrich_schwietering at Bitbucket:

Appendum: I tried to use pypi-install (from python-stdeb) as well, but got an error message

xmlrpclib.ProtocolError: <ProtocolError for python.org/pypi: 301 Moved Permanently>

I had to change the address in pypi-install to http://pypi.python.org/pypi , to get it working again. I know, that is not our problem here, but I thought it might be interesting for others as well ;-)

jwilk commented 10 years ago

never encountered anything like that in in all those years of using checkinstall

According to my mail archive, yes, you did. :-P But we didn't figure out what was wrong back then, and the problem magically disappeared.

xmlrpclib.ProtocolError: <ProtocolError for python.org/pypi: 301 Moved Permanently>

I believe that's a know bug: https://bugs.debian.org/744097

jwilk commented 10 years ago

Closing as “invalid”, as it's not a bug in ocrodjvu per se.