From 75252a3797ebef60e4a0b0f60a3bf0f39b78fb2b Mon Sep 17 00:00:00 2001 From: Christoph Heuel Date: Mon, 7 Mar 2016 19:57:12 +0100 Subject: [PATCH] direct_image throws TypeError * The _raw method accepts only byte strings --- escpos/escpos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index 5da620f..33d3905 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -251,7 +251,7 @@ class Escpos(object): i = 0 temp = 0 self._raw(binascii.unhexlify(bytes(buf, "ascii"))) - self._raw('\n') + self._raw(b'\n') def qr(self, text): """ Print QR Code for the provided string