Using Debian, Install escpos, to be able to print on an Epson TM-T20II printer, and I have an application on python3. The problem I have is when I send to print it generates the following error:
File "/media/palma/Proyectos/Django/parqueadero/virtual/lib/python3.4/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
For which the file /etc/udev/rules.d/99-escpos.rule was created
SUBSYSTEM=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0e15", MODE="0666", GROUP="dialout"
The order to print is given in this way:
from escpos.printer import Usb
p = Usb(0x04b8, 0x0202)
p.text("Hello World\n")
When I do it as a root user, it prints correctly