Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to fix USBError: [Errno 32] Pipe error in Posboxless enviroment?

By
Monchai P
on 9/3/16, 1:07 AM 298 views

I'm trying to setup posboxless on my Linux laptop for testing. I'm also new to Linux and Odoo world. 

environment
  • Ubuntu 16.04 LTS

  • Odoo 9 (a local instance)

  • esc/pos printer EPSON TM-T88IV

how to reproduce

    1. run odoo.py --load=web,hw_proxy,hw_posbox_homepage,hw_escpos

          The printer prints out PoxBox Status on the paper and everything seem fine.

    2. Check the status via web page http://localhost:8069/hw_proxy/status 

         It reports hardware status and everything seem fine.

         However it reports error on the terminal and the status page cannot be accessed from the browser anymore when I press refresh. 


         The error is related to Pipe which I really don't know how to fix it. Please help me solve. 

 
2016-09-03 04:04:38,248 4789 INFO ? openerp.addons.hw_escpos.controllers.main: error : [Errno 32] Pipe error
2016-09-03 04:04:38,248 4789 ERROR ? openerp.addons.hw_escpos.controllers.main: ESC/POS Error: [Errno 32] Pipe error
2016-09-03 04:04:38,249 4789 ERROR ? openerp.addons.hw_escpos.controllers.main: [Errno 32] Pipe error
------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/addons/hw_escpos/controllers/main.py", line 148, in run
printer = self.get_escpos_printer()
File "/usr/lib/python2.7/dist-packages/openerp/addons/hw_escpos/controllers/main.py", line 105, in get_escpos_printer
printers = self.connected_usb_devices()
File "/usr/lib/python2.7/dist-packages/openerp/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 "/home/mon/.local/lib/python2.7/site-packages/usb/util.py", line 264, in get_string
langid
File "/home/mon/.local/lib/python2.7/site-packages/usb/control.py", line 169, in get_descriptor
data_or_wLength = desc_size
File "/home/mon/.local/lib/python2.7/site-packages/usb/core.py", line 711, in ctrl_transfer
self.__get_timeout(timeout)
File "/home/mon/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 836, in ctrl_transfer
timeout))
File "/home/mon/.local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 571, in _check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 32] Pipe error
------------------------------------------------------------

 



0
Monchai P
On 10/19/16, 11:27 PM

There is a bug about getting description string from the printer. Even though the printer is in Odoo's support list, some printers are built for a specific region and language. I guess Posbox might be mainly tested with the printer built for Latin-base language. 

Apply the patch from the following link to solve this issue:

https://github.com/odoo/odoo/commit/994d45f4788ef6b50a50893531d8066483cfaed5

Thank @mart-e for making the patch

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/3/16, 1:07 AM
Seen: 298 times
Last updated: 10/19/16, 11:27 PM