You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thanks for your work on this package, it's awesome!
I've been running into an issue with some "images" where the program crashes at line 119 while trying to iterate over the OCR results. It seems like the 'success' variable is returning true even though there were no results available. I've pasted the program output below as well as a sample image which you should be able to use to reproduce the issue. A quick fix could be to check to confirm that there actually are results alongside the 'success' check in line 118 (although what's confusing to me is that I've tested this on some other blank images that correctly returned an empty list as expected...).
Traceback (most recent call last): File "[...]/test.py", line 72, in <module> annotations = ocrmac.OCR('/blank_image.png').recognize() File "[...]/lib/python3.9/site-packages/ocrmac/ocrmac.py", line 158, in recognize res = text_from_image( File "[...]/lib/python3.9/site-packages/ocrmac/ocrmac.py", line 119, in text_from_image for result in req.results(): TypeError: 'NoneType' object is not iterable
Hi! Thanks for your work on this package, it's awesome!
I've been running into an issue with some "images" where the program crashes at line 119 while trying to iterate over the OCR results. It seems like the 'success' variable is returning true even though there were no results available. I've pasted the program output below as well as a sample image which you should be able to use to reproduce the issue. A quick fix could be to check to confirm that there actually are results alongside the 'success' check in line 118 (although what's confusing to me is that I've tested this on some other blank images that correctly returned an empty list as expected...).
Traceback (most recent call last): File "[...]/test.py", line 72, in <module> annotations = ocrmac.OCR('/blank_image.png').recognize() File "[...]/lib/python3.9/site-packages/ocrmac/ocrmac.py", line 158, in recognize res = text_from_image( File "[...]/lib/python3.9/site-packages/ocrmac/ocrmac.py", line 119, in text_from_image for result in req.results(): TypeError: 'NoneType' object is not iterable
Blank image example
The text was updated successfully, but these errors were encountered: