Skip to content

Exception attempting TCPPrinter.send_job #39

@BiatuAutMiahn

Description

@BiatuAutMiahn
import zpl

l = zpl.Label(20,32)
l.origin(8,2)
l.barcode('Q', 'https://github.com/cod3monk/zpl/', magnification=7)
l.endorigin()

zp=zpl.TCPPrinter("<snip>")
zp.send_job(l)

zp.send_job(l) causes exception:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "<snip>\Python\3.11.0\Lib\site-packages\zpl\printer.py", line 244, in send_job
    log.exception('exception')
    ^^^^^^^^^^^^^^^
TypeError: Logger.exception() missing 1 required positional argument: 'msg'

zp.send_job(l.dumpZPL()) works fine.

After the exception occurs you must re-instantiate zp to use socket again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions