Skip to content

Create Issues_log.txt #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions python/queries/Issues_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Date: 02/14/2023
Issue: I have a multiple pages PDF and 1st page is landscape orientation, which is the envelope cover with some text like "Presorted" etc.
When I run through the PDF, I am getting the below error since from the output of "d = t2.TDocumentSchema().load(response)" line it is expecting
"block_type = 'PAGE'" in the next line of code "page = d.pages[0]". I get the below error, but when I remove the first page and run, I get proper queries output. I am guessing if the code "t2.TDocumentSchema().load(response)" is not handling multi page pdf? Please advise.

========
Error:
File "/opt/python/trp/trp2.py", line 631, in pages
page_blocks = self.block_map(TextractBlockTypes.PAGE).values()
File "/opt/python/trp/trp2.py", line 491, in block_map
return {k: self.blocks[v] for k, v in self._block_id_maps[block_type.name].items()}
[ERROR] KeyError: 'PAGE' Traceback (most recent call last): File "/var/task/lambda_function.py", line 199, in lambda_handler raise e File "/var/task/lambda_function.py", line 175, in lambda_handler paths = process_response( File "/var/task/helper/helper.py", line 240, in process_response page = d.pages[0] File "/opt/python/trp/trp2.py", line 631, in pages page_blocks = self.block_map(TextractBlockTypes.PAGE).values() File "/opt/python/trp/trp2.py", line 491, in block_map return {k: self.blocks[v] for k, v in self._block_id_maps[block_type.name].items()}
=======