Skip to content

is_online() is broken #275

Closed
Closed

Description

@arborin

Hello, is it possible to check, printed my request or not?

Thank you.

Activity

  1. patkan commented on Dec 10, 2017

    @patkan
    Member

    Do you mean checking whether the printer has successfully printed the receipt?

    As far as I know there is no general option in standard ESCPOS, but maybe your printer can do that (however I haven't heard of any yet)

    Your best bet would probably be asking a human to check or checking the state of your printer before and after the print.

    If you describe your use case a bit, we can try to search a solution.

  2. arborin commented on Dec 10, 2017

    @arborin
    Author

    Thank you for a quick response.
    In my case I'm printing on remote printer and don't see if print job done successfully.

    Paper status working perfect, but then I check if printer is online, I am getting this trackback:

    >>> Epson.is_online() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/bobo/.local/lib/python3.5/site-packages/escpos/escpos.py", line 847, in is_online return not (status & RT_MASK_ONLINE) TypeError: unsupported operand type(s) for &: 'array.array' and 'int'

    on "EPSON TM-T88V Receipt" printer. may be there is a some other solution...

  3. Paulo-Branco commented on Dec 14, 2017

    @Paulo-Branco

    I'm also having the same issue when calling the is_online() method.

  4. changed the title [-]Print status[/-] [+]is_online() is broken[/+] on Feb 3, 2018
  5. patkan commented on Feb 3, 2018

    @patkan
    Member

    Thank you for the report, I checked and there is a bug in is_online(). (status is and array)
    To fix this compare https://github.com/python-escpos/python-escpos/blob/development/src/escpos/escpos.py#L847 with paper_status.

  6. thijstriemstra commented on Feb 12, 2018

    @thijstriemstra
    Contributor

    @patkan ran into same issue, opened #282 that fixes the issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions