amazon-textract-textractor
amazon-textract-textractor copied to clipboard
two line import fix for get_layout_csv_from_trp2
The imports for t_pretty_print_layout.py:
import os
import warnings
import logging
from trp.trp2 import TDocument
from typing import List
Then line 262 expects t2:
relationships: t2.TRelationship = page.get_relationships_for_type()
The simplest fix (confirms this work locally) is to update the import to:
import trp.trp2 as t2
and then update line 241:
def get_layout_csv_from_trp2(trp2_doc: t2.TDocument) -> List[List[List[str]]]: