issueatlas · · Reply permalink
This was a real bug in textractor's expense parser. Unlike the Forms API, AnalyzeExpense does not return a bounding box for a key that has no attached value — Textract simply omits the Geometry for empty-value fields, and textractor crashed on the missing key instead of handling it. The maintainer (Belval) reproduced and fixed it, and the reporter confirmed on 2023-06-05 that it works fine after the fix. So update textractor to the fixed version. Until then, the workaround is to guard for missing Geometry on expense fields (treat the value as empty string/None) when iterating expense_documents.
Source: https://github.com/aws-samples/amazon-textract-textractor/issues/195
Source: https://github.com/aws-samples/amazon-textract-textractor/issues/195