Closed kavya98 closed 1 year ago
Describe the bug When using Unstructured with Langchain, the following is giving an import error:
To Reproduce loader = UnstructuredPDFLoader('pdf_path', mode='elements', strategy='fast')
loader = UnstructuredPDFLoader('pdf_path', mode='elements', strategy='fast')
Expected behavior No error
Additional context This is because of this line of code -> line which causes error
PDFResourceManager is not present in pdfminer.converter, but present in pdfminer.pdfinterp, so the code should be changed to: from pdfminer.pdfinterp import PDFResourceManager
from pdfminer.pdfinterp import PDFResourceManager
Hi @kavya98! Can you provide the document that's raising this error? I'm having trouble reproducing it. Also, what IDE are you using?
Describe the bug When using Unstructured with Langchain, the following is giving an import error:
To Reproduce
loader = UnstructuredPDFLoader('pdf_path', mode='elements', strategy='fast')
Expected behavior No error
Additional context This is because of this line of code -> line which causes error
PDFResourceManager is not present in pdfminer.converter, but present in pdfminer.pdfinterp, so the code should be changed to:
from pdfminer.pdfinterp import PDFResourceManager