eymlo / python-escpos

Automatically exported from code.google.com/p/python-escpos
GNU General Public License v3.0
1 stars 0 forks source link

Generic.text("Hello World") File "/usr/local/lib/python2.7/dist-packages/escpos/escpos.py", line 264, in text self._raw(text) #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Dear community;

I use Rasbian, I got the phoenix printer 
(http://pyramidacceptors.com/phoenix-printer/) from PTI. I use Rasbian as OS. I 
attach a dump of the details of printer. I used following python code:

from escpos import *
Epson = printer.Usb(0x2504,0x0300)
Epson.text("Hello World")
Epson.cut()

Running this code as root results:

  File "gpio.py", line 5, in <module>
    Epson.text("Hello World")
  File "/usr/local/lib/python2.7/dist-packages/escpos/escpos.py", line 264, in text
    self._raw(text)
  File "/usr/local/lib/python2.7/dist-packages/escpos/printer.py", line 58, in _raw
    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'

All the best;

Original issue reported on code.google.com by hellerja...@gmail.com on 18 Jul 2014 at 2:52

GoogleCodeExporter commented 9 years ago
I forget the dump of the printer details, here it is.

Original comment by hellerja...@gmail.com on 18 Jul 2014 at 2:53

Attachments: