diff --git a/src/escpos/printer/cups.py b/src/escpos/printer/cups.py index 0625b01..b4d430e 100644 --- a/src/escpos/printer/cups.py +++ b/src/escpos/printer/cups.py @@ -172,9 +172,9 @@ class CupsPrinter(Escpos): self.pending_job = True try: self.tmpfile.write(msg) - except ValueError: + except TypeError: self.pending_job = False - raise ValueError("Printer job not opened") + raise TypeError("Bytes required. Printer job not opened") def send(self): """Send the print job to the printer."""