Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
finlopes97 opened this issue May 18, 2022 · 1 comment
Open

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

finlopes97 opened this issue May 18, 2022 · 1 comment

Comments

@finlopes97
Copy link

finlopes97 commented May 18, 2022

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.

@klirichek
Copy link
Owner

That is not related to this project.
That is just cups filter, and includes exactly two files - filter itself + ppd file.
It has nothing to deal with python, serial, and even any interface of how actual printer is plugged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants