aws-samples / aws-samples/amazon-textract-textractor
KeyError in get_lines_string
- Dominant language
- Jupyter Notebook
- Stars
- 493
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Description
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'
```
Contributor guide
Research direction
Start with get_lines_string() and the referenced trp ___int____.py at line 153, where blockMap[cid] raises the KeyError. Trace how cid and blockMap are built, then determine the intended behavior when the key is absent; completion should prevent the reported exception and include a test for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100