amazon-textract-textractor icon indicating copy to clipboard operation
amazon-textract-textractor copied to clipboard

two line import fix for get_layout_csv_from_trp2

Open scott-norm opened this issue 1 year ago • 1 comments

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]]]:

scott-norm avatar Jan 21 '24 12:01 scott-norm