Python / Elaphe generates broken barcodes
Question: I am trying to generate code128 barcodes using Python/Elaphe, which is based
on Barcode Writer In Pure Postscript (BWIPP). Strangely, the barcodes
generated by Elaphe don't match the ones generated by BWIPP and do not conform
to code 128 standard.

In particular, I tried a simple example, the generation of a barcode for the
letter 'A' (capital A):

    
    
    from elaphe import barcode 
    b = barcode('code128', 'A') 
    b.show()
    

That works just fine, but the generated barcode is missing the right part. It
is 35 pixels wide, where it should be 46. The left part of the barcode matches
the one generated by BWIPP and every other code128 generator - it's only the
right section that is missing.

Anyone know what's wrong?

(Using elaphe 0.6.0 with python 2.7.10 on Kubuntu 15.10)


Answer: See this bug report:
<https://bitbucket.org/whosaysni/elaphe/issues/84/code-128-generation-
produces-unreadable>

It seems that this bug is fixed in the current source version, also the bug is
still marked as new. The the patch which fixed this bug imho:
<https://bitbucket.org/whosaysni/elaphe/commits/19dd8f58c76ac75914e3e4d8ae7db1b9489cbcb8?at=develop>

This patch is from the 2014-10-22, the current version elaphe 0.6.0 on pypi is
from 2013-12-05. If you installed via pip you have the buggy version.

There is a python3 enabled fork of this project
<https://pypi.python.org/pypi/elaphe3>, which was uploaded on the 2016-05-25.
So this fork might contain the necessary bugfix. You could remove elaphe and
install elaphe3.

However, considering that elaphe (at least the non 3 version) looks pretty
abandoned and has GhostScript and PIL as dependencies I would look for another
solution.

