You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2023. It is now read-only.
When trying to run python3 printertest.py (on my pi zero w) I get the error:
File "/home/pi/.local/lib/python3.9/site-packages/serial/serialposix.py", line 398, in _reconfigure_port
orig_attr = termios.tcgetattr(self.fd)
termios.error: (25, 'Inappropriate ioctl for device')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/Python-Thermal-Printer/printertest.py", line 5, in <module>
printer = Adafruit_Thermal("/dev/usb/lp0", 9600, timeout=5)
File "/home/pi/Python-Thermal-Printer/Adafruit_Thermal.py", line 84, in __init__
Serial.__init__(self, *args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/serial/serialutil.py", line 244, in __init__
self.open()
File "/home/pi/.local/lib/python3.9/site-packages/serial/serialposix.py", line 332, in open
self._reconfigure_port(force_update=True)
File "/home/pi/.local/lib/python3.9/site-packages/serial/serialposix.py", line 401, in _reconfigure_port
raise SerialException("Could not configure port: {}".format(msg))
serial.serialutil.SerialException: Could not configure port: (25, 'Inappropriate ioctl for device')
In printertest.py I change the printer setup line to: printer = Adafruit_Thermal("/dev/usb/lp0", 9600, timeout=5)
This is because I could only get the first test to work with /dev/usb/lp0 and my print test page said it is 9600.
The text was updated successfully, but these errors were encountered:
When trying to run
python3 printertest.py
(on my pi zero w) I get the error:In printertest.py I change the printer setup line to:
printer = Adafruit_Thermal("/dev/usb/lp0", 9600, timeout=5)
This is because I could only get the first test to work with /dev/usb/lp0 and my print test page said it is 9600.
The text was updated successfully, but these errors were encountered: