aws-samples / aws-samples/amazon-textract-textractor

'NoneType' object has no attribute 'spatial_object' on Expense Analysis results

Open
#368 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
493
Forks
163
PR merge metrics
No merged PRs in 30d

Description

https://github.com/aws-samples/amazon-textract-textractor/blob/9df5d268dead3f42104cde2f766cb16be3f93d95/textractor/entities/expense_field.py#L184-L189

The above code throws an `AttributeError` when the `bbox` on `self.expenses[0]` is None. Since `spatial_object` can be None, would it make sense to add some protection here?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.