aws-samples / amazon-textract-response-parser

Parse JSON response of Amazon Textract
Apache License 2.0
218 stars 95 forks source link

Validation Error For Textract Analyze Expense #135

Closed victormartingarcia closed 1 year ago

victormartingarcia commented 1 year ago

Parsing a Textract expense analysis throws a ValidationError:

{'ExpenseDocuments': {0: {'SummaryFields': {24: {'Currency': ['Unknown field.']}, 25: {'Currency': ['Unknown field.']}, 26: {'Currency': ['Unknown field.']}}, 'Blocks': ['Unknown field.']}, 1: {'Blocks': ['Unknown field.']}}, 'AnalyzeExpenseModelVersion': ['Unknown field.']}

As done in #40 , we should make the TAnalyzeExpenseDocumentSchema ignore unkown fields preventing the marshalling error

Godm5 commented 1 year ago

Having this same exact error. Please merge https://github.com/aws-samples/amazon-textract-response-parser/pull/136

athewsey commented 1 year ago

It looks like this issue is now resolved as #136 is merged and released to PyPI (v0.1.45, April 19th), plus no recent activity.

Therefore closing it for now - please do re-open if needed!