adafruit / Python-Thermal-Printer

217 stars 147 forks source link

hasPaper crashes #10

Open duellsy opened 9 years ago

duellsy commented 9 years ago

There's an error with the hasPaper call, we consistently get this when we call printer.hasPaper()

Traceback (most recent call last):
  File "vcprint.py", line 27, in <module>
    if(not printer.hasPaper()):
  File "/home/pi/Python-Thermal-Printer/Adafruit_Thermal.py", line 534, in hasPaper
    stat = ord(self.read(1)) & 0b00000100
TypeError: ord() expected a character, but string of length 0 found
duellsy commented 9 years ago

I can't actually see where the read method is to be able to check anything