api = tesserocr.PyTessBaseAPI()
api.SetImage(image)
api.Recognize()
ri = api.GetIterator()
level = tesserocr.RIL.SYMBOL
for r in tesserocr.iterate_level(ri, level):
ci = r.GetChoiceIterator()
for _ in ci:
print(123) # crash before this print
api.End()
error result_it.it_->word() != nullptr:Error:Assert failed:in file C:\projects\tesserocr-windows-build\tesseract\src\ccmain\ltrresultiterator.cpp, line 383 when encountering an empty api.GetUTF8Text().
error
result_it.it_->word() != nullptr:Error:Assert failed:in file C:\projects\tesserocr-windows-build\tesseract\src\ccmain\ltrresultiterator.cpp, line 383
when encountering an emptyapi.GetUTF8Text()
.I guess the issue is probably around https://github.com/sirfz/tesserocr/blob/2fd8eb53f337a289ce557132cd0ac7e0048a2fcc/tesserocr.pyx#L1112