Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Mar 17, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 18 Jul 2014 at 2:52

@GoogleCodeExporter
Copy link
Author

I forget the dump of the printer details, here it is.

Original comment by [email protected] on 18 Jul 2014 at 2:53

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant