receipt-scanner icon indicating copy to clipboard operation
receipt-scanner copied to clipboard

Step ReceiptGenerator/draw_receipt Fail

Open by-tech opened this issue 7 years ago • 3 comments

On "python draw_receipt.py 10" we got sometime an error.

before to execute i changes draw_receipt.py line 414 to use function create_sample

        else:
            #create_noised_crnn_sample(count) # todo ael : default ?
            create_sample(count)

Program generate some receipt, but sometime we got an error

Traceback (most recent call last):
  File "draw_receipt.py", line 415, in <module>
    create_sample(count)
  File "draw_receipt.py", line 397, in create_sample
    draw_receipt_with_letter_boxes(debug=True)
  File "draw_receipt.py", line 225, in draw_receipt_with_letter_boxes
    text = items_text + item_space + separator_line + item_space + item_to_text(item_list['total'], num_col, dist_name_price, break_long_words)
  File "draw_receipt.py", line 50, in item_to_text
    lines = wrapper.wrap(name)
  File "C:\Users\ael\Anaconda3\lib\textwrap.py", line 354, in wrap
    return self._wrap_chunks(chunks)
  File "C:\Users\ael\Anaconda3\lib\textwrap.py", line 248, in _wrap_chunks
    raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width -2 (must be > 0)

is this normal ? or i missing some configuration ?

Regards

by-tech avatar Jul 28 '18 00:07 by-tech

@DesperadoFlames Could you please have a look at it? Thanks!

billstark avatar Jul 30 '18 03:07 billstark

no news from long time. is this project will be maintain or not ?

by-tech avatar Aug 13 '18 15:08 by-tech

@sgatrip Sorry I suppose for now the project is not under maintenance. I will let you know when we are working on it again! Sorry about it!

billstark avatar Sep 20 '18 05:09 billstark