aws-samples / amazon-textract-textractor

Analyze documents with Amazon Textract and generate output in multiple formats.
Apache License 2.0
360 stars 134 forks source link

KeyError in get_lines_string #348

Open sbui-dev opened 2 months ago

sbui-dev commented 2 months ago

The trp code called by get_lines_string() expects the cid key to be in blockMap. If it's not, an exception is thrown in trp _int__.py:

line 153, in __init__
    if (blockMap[cid]["BlockType"] == "WORD"):
        ~~~~~~~~^^^^^
KeyError: 'd019e793-f973-4326-87ef-a4bfa06619ab'