noteshrink icon indicating copy to clipboard operation
noteshrink copied to clipboard

ValueError: cannot reshape array of size 1 into shape (3)

Open tneupaney opened this issue 7 years ago • 1 comments

Got this error while running. I wanted to work on a small bill I got from a grocery shop.

./noteshrink.py bill.jpg opened bill.jpg Traceback (most recent call last): File "./noteshrink.py", line 587, in <module> main() File "./noteshrink.py", line 584, in main notescan_main(options=get_argument_parser().parse_args()) File "./noteshrink.py", line 559, in notescan_main samples = sample_pixels(img, options) File "./noteshrink.py", line 342, in sample_pixels pixels = img.reshape((-1, 3)) ValueError: cannot reshape array of size 1 into shape (3)

tneupaney avatar Mar 12 '18 13:03 tneupaney

I got the same error with files that were post-processed and some EXIF fields were incorrect / not updated.

As a workaround, try to remove the EXIF metadata from file (e.g. using exiftool -all= -overwrite_original FILE.

clapautius avatar Oct 04 '19 20:10 clapautius

Thank you

tneupaney avatar Jun 20 '23 05:06 tneupaney