Community mailing list archives

community@mail.odoo.com

Re: what is the solution of the problem for "hw_escpos" module in odoo v9??

by
Abhishek Mehta
- 04/14/2016 02:00:57
Hello Omar,

Did you check the configuration or connection of hardware (possibly printer) connected via USB.

This error message you pasted seems problem with your any USB device to trace the issues you can print value of given line in traceback.

this is line and location from where trace back generated.

/home/odoo/odoo-dev/odoo/addons/hw_escpos/controllers/main.py", line 92, in connected_usb_devices
    'name': usb.util.get_string(printer, 256, printer.iManufacturer) + " " + usb.util.get_string(printer, 256, printer.iProduct)

Please print the values code passes in the get_string function.

---
---
Thanks & Regards,
Abhishek Mehta
Project Manager,

Serpent Consulting Services Pvt. Ltd.
"Where Quality Time and Accuracy are valued the Most."
Mobile : 91 - 9428277041
Skype: a.mehta.serpentcs



On Wed, Apr 13, 2016 at 7:37 PM, omar frikha <omarfrikha59@gmail.com> wrote:
raceback (most recent call last):
  File "/home/odoo/odoo-dev/odoo/addons/hw_escpos/controllers/main.py", line 148, in run
    printer = self.get_escpos_printer()
  File "/home/odoo/odoo-dev/odoo/addons/hw_escpos/controllers/main.py", line 105, in get_escpos_printer
    printers = self.connected_usb_devices()
  File "/home/odoo/odoo-dev/odoo/addons/hw_escpos/controllers/main.py", line 92, in connected_usb_devices
    'name': usb.util.get_string(printer, 256, printer.iManufacturer) + " " + usb.util.get_string(printer, 256, printer.iProduct)
  File "/usr/local/lib/python2.7/dist-packages/pyusb-1.0.0b2-py2.7.egg/usb/util.py", line 271, in get_string
    langid
  File "/usr/local/lib/python2.7/dist-packages/pyusb-1.0.0b2-py2.7.egg/usb/control.py", line 173, in get_descriptor
    data_or_wLength = desc_size)
  File "/usr/local/lib/python2.7/dist-packages/pyusb-1.0.0b2-py2.7.egg/usb/core.py", line 955, in ctrl_transfer
    self._ctx.managed_open()
  File "/usr/local/lib/python2.7/dist-packages/pyusb-1.0.0b2-py2.7.egg/usb/core.py", line 105, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/usr/local/lib/python2.7/dist-packages/pyusb-1.0.0b2-py2.7.egg/usb/backend/libusb1.py", line 722, in open_device
    return _DeviceHandle(dev)
  File "/usr/local/lib/python2.7/dist-packages/pyusb-1.0.0b2-py2.7.egg/usb/backend/libusb1.py", line 600, in __init__
    _check(_lib.libusb_open(self.devid, byref(self.handle)))
  File "/usr/local/lib/python2.7/dist-packages/pyusb-1.0.0b2-py2.7.egg/usb/backend/libusb1.py", line 552, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe