0

We are trying to connect USB thermal printer using escpos. Below is the code:

from escpos.printer import getUSBPrinter
printer = getUSBPrinter(commandSet='Generic')(idVendor=0x067B,idProduct=0x2305)
printer.text("Hello")
printer.lf()

We are getting the below error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\EKPRSGR\AppData\Local\Continuum\anaconda3\lib\site-packages\usb\core.py", line 1263, in find
    raise NoBackendError('No backend available') 
khelwood
  • 55,782
  • 14
  • 81
  • 108
  • Isn't pyusb installed? [Dependencies](https://github.com/python-escpos/python-escpos#dependencies), [escposprinter 6.2](https://pypi.org/project/escposprinter/) – kunif Aug 20 '20 at 00:45
  • The Python versions are different, but maybe these articles are relevant. [Printing with Python and Epson POS printer.](https://medium.com/@nyorikakar/printing-with-python-and-epson-pos-printer-fbd17e127b6c), [Error trying to call the backend module in pyusb. "AttributeError: 'module' object has no attribute 'backend'"](https://stackoverflow.com/q/22273100/9014308), [eblot/printer.py](https://gist.github.com/eblot/4336647), [Simple communication USB with python PyUSB on Windows 10](https://stackoverflow.com/q/58131082/9014308) – kunif Aug 20 '20 at 10:47

0 Answers0