Community mailing list archives

community@mail.odoo.com

Printing receipt from a portable mobile thermal printer with Posbox

by
Kingsley
- 07/03/2016 07:52:12
Hi Community;
I got a mobile portable thermal printer for Posbox. I have been able to 
print my receipt from a esc/pos printer. but this time around, i cannot 
print from a mobile thermal printer. It throws up the following error.  
Has anyone experienced this error?


2016-07-03 11:46:16,085 8579 INFO ? 
openerp.addons.hw_escpos.controllers.main: connected : Connected to 
STMicroelectronics USB Portable Printer
2016-07-03 11:46:16,118 8579 INFO ? 
openerp.addons.hw_escpos.controllers.main: error : 'NoneType' object has 
no attribute 'bmAttributes'
2016-07-03 11:46:16,118 8579 ERROR ? 
openerp.addons.hw_escpos.controllers.main: ESC/POS Error: 'NoneType' 
object has no attribute 'bmAttributes'
2016-07-03 11:46:16,118 8579 ERROR ? 
openerp.addons.hw_escpos.controllers.main: 'NoneType' object has no 
attribute 'bmAttributes'
------------------------------------------------------------
Traceback (most recent call last):
   File 
"/home/kingsley/Odoo/odoo-9.0/addons/hw_escpos/controllers/main.py", 
line 166, in run
     self.print_status(printer)
   File 
"/home/kingsley/Odoo/odoo-9.0/addons/hw_escpos/controllers/main.py", 
line 200, in print_status
     eprint.text('\n\n')
   File 
"/home/kingsley/Odoo/odoo-9.0/addons/hw_escpos/escpos/escpos.py", line 
826, in text
     self._raw(txt)
   File 
"/home/kingsley/Odoo/odoo-9.0/addons/hw_escpos/escpos/printer.py", line 
68, in _raw
     if len(msg) != self.device.write(self.out_ep, msg, self.interface):
   File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 625, 
in write
     fn = fn_map[self._ctx.get_endpoint_type(self, endpoint, intf)]
   File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 180, 
in get_endpoint_type
     etype = util.endpoint_type(e.bmAttributes)
AttributeError: 'NoneType' object has no attribute 'bmAttributes'
------------------------------------------------------------

2016-07-03 11:46:16,222 8579 INFO ? 
openerp.addons.hw_escpos.controllers.main: connected : Connected to 
STMicroelectronics USB Portable Printer
Exception usb.core.USBError: USBError(19, 'No such device (it may have 
been disconnected)') in > ignored