From 37561d89866b5b709c097b5a363026b6c684bef1 Mon Sep 17 00:00:00 2001 From: David Peterson <34923485+Haste171@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:29:08 -0600 Subject: [PATCH] Add Proper Import Error (#13042) - **Description:** The issue was not listing the proper import error for amazon textract loader. - **Issue:** Time wasted trying to figure out what to install... (langchain docs don't list the dependency either) - **Dependencies:** N/A - **Tag maintainer:** @sbusso - **Twitter handle:** @h9ste --------- Co-authored-by: Harrison Chase --- libs/langchain/langchain/document_loaders/parsers/pdf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/langchain/langchain/document_loaders/parsers/pdf.py b/libs/langchain/langchain/document_loaders/parsers/pdf.py index ae0c3105292..606c767714a 100644 --- a/libs/langchain/langchain/document_loaders/parsers/pdf.py +++ b/libs/langchain/langchain/document_loaders/parsers/pdf.py @@ -476,8 +476,10 @@ class AmazonTextractPDFParser(BaseBlobParser): self.textract_features = [] except ImportError: raise ImportError( - "Could not import amazon-textract-caller python package. " - "Please install it with `pip install amazon-textract-caller`." + "Could not import amazon-textract-caller or " + "amazon-textract-textractor python package. Please install it " + "with `pip install amazon-textract-caller` & " + "`pip install amazon-textract-textractor`." ) if not client: