Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception attempting TCPPrinter.send_job #39

Open
BiatuAutMiahn opened this issue Dec 7, 2022 · 0 comments
Open

Exception attempting TCPPrinter.send_job #39

BiatuAutMiahn opened this issue Dec 7, 2022 · 0 comments

Comments

@BiatuAutMiahn
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant