Skip to content

termios.error: (5, 'Input/output error') #37

@finlopes97

Description

@finlopes97

When trying to run gv2thermal_printer_config.py returns error:

pi@raspberrypi:~/zj-58 $ sudo python gv2_thermal_printer_config.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/serial/serialposix.py", line 398, in _reconfigure_port
    orig_attr = termios.tcgetattr(self.fd)
termios.error: (5, 'Input/output error')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/zj-58/gv2_thermal_printer_config.py", line 12, in <module>
    ser = serial.Serial(PORT, BAUD, timeout=0.5)
  File "/usr/local/lib/python3.9/dist-packages/serial/serialutil.py", line 244, in __init__
    self.open()
  File "/usr/local/lib/python3.9/dist-packages/serial/serialposix.py", line 332, in open
    self._reconfigure_port(force_update=True)
  File "/usr/local/lib/python3.9/dist-packages/serial/serialposix.py", line 401, in _reconfigure_port
    raise SerialException("Could not configure port: {}".format(msg))
serial.serialutil.SerialException: Could not configure port: (5, 'Input/output error')

Printer is this model "Mini thermal printer." Flow control listed on the test sheet is "HW Flow Ctrl" so I'm trying to turn on xon/xoff following this tutorial. Baudrate is 19200.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions