[Python-modules-team] Bug#926351: python3-tesserocr: segfaults on import

zaza terberh at gmail.com
Thu Apr 18 13:59:57 BST 2019


On Fri, 5 Apr 2019 23:26:55 +0200 =?UTF-8?Q?Bernhard_=c3=9cbelacker?= <bernhardu at mailbox.org> wrote:
> Dear Maintainer,
> just tried to help triaging this issue.

Me too.

> Seems this is "expected" behaviour with LC_ALL not
> set to "C". In the end it leads to this upstream bug:
>     https://github.com/sirfz/tesserocr/issues/165
> It contains some workarounds and more information.


There is a simplistic solution. Set 'locale' before 'import tesserocr'
doing something like this:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'C')
>>> import tesserocr

Or adding some code, like here:

The workaround - set locale - is known. It is in debian/rules[0] file. But the 
user should be informed about it.

[0] - https://sources.debian.org/src/python-tesserocr/2.4.0-4/debian/changelog/

BTW, CI tests never passed. And it is not a reproducible build. Two tests fail.

 - https://sources.debian.org/src/python-tesserocr/2.4.0-4/tests/test_api.py/#L227
 - https://sources.debian.org/src/python-tesserocr/2.4.0-4/tests/test_api.py/#L275

The package was recently added to Debian. Low popcon.


More information about the Python-modules-team mailing list