eymlo / python-escpos

Automatically exported from code.google.com/p/python-escpos
GNU General Public License v3.0
1 stars 0 forks source link

TXT_ALIGN_CT referenced but not defined in PyPI-provided v1.0.6 #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. sudo pip install python-escpos
2. Run the test code from https://code.google.com/p/python-escpos/wiki/Usage

The test code successfully prints the barcode when using the archive 
downloadable from Google Code but, since that's too old to have QR Code 
support, I switched to the pip-provided version instead.

However, the pip-provided version errors out because the TXT_ALIGN_CT constant 
isn't defined:

Traceback (most recent call last):
  File "test_escpos.py", line 37, in <module>
    test()
  File "test_escpos.py", line 16, in test
    Epson.barcode('1324354657687', 'EAN13', 64, 2, '', '')
  File "/usr/local/lib/python2.7/dist-packages/escpos/escpos.py", line 209, in barcode
    self._raw(TXT_ALIGN_CT)
NameError: global name 'TXT_ALIGN_CT' is not defined

Original issue reported on code.google.com by stephan....@gmail.com on 20 May 2014 at 3:13

GoogleCodeExporter commented 9 years ago
Hi stephan.sokolow,

Thank you for your interest in the project, but seems like you ended up with 
mixed projects.

I'm working on this project at google code on my spare time,
and the project you are talking about at PyPi is a fork of this one.

You might want to go to
https://pypi.python.org/pypi/python-escpos/1.0.6
and try to reach the Package Index Owner for a solution.

If you choose to stay with my project, I'm glad to tell you that current code 
has support for QR encode.

Thank you.

Original comment by manpaz on 21 May 2014 at 5:06

GoogleCodeExporter commented 9 years ago
Ahh. Sorry about that. I got confused by this line in the PyPI metadata block.

    Home Page: http://code.google.com/p/python-escpos

You might want to ask him to change that.

As for QR code support, I am currently running your HG tip but I may or may not 
be able to use it because I'm still trying to find a way to identify whether 
it's my printer or your library that's at fault for dropping rows when printing 
images, which makes QR codes unreliable at best.

Original comment by stephan....@gmail.com on 21 May 2014 at 4:34

GoogleCodeExporter commented 9 years ago
...actually, if I can solve that row-dropping problem, I'll probably go with 
yet another fork which adds a fullimage() method to print wide images by 
scaling and long images by slicing into chunks.

https://github.com/DavisGoglin/python-escpos

My intent is to drive the printer by rasterizing in software so I can use 
arbitrary fonts, layout, and barcode symbologies not supported by python-escpos 
and, with fullimage(), that becomes trivial.

(It also makes it easy for me to check if the dropped rows problem is some kind 
of buffer exhaustion in the printer by setting the slicing to an interval 
smaller than the period of the row dropping and adding a delay.)

Original comment by stephan....@gmail.com on 21 May 2014 at 6:13