0

I am creating Python Flask app in Mac Os (first time using Macbook). I am facing a strange error: pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?

echo $PATH in terminal displays:

/Users/ziga/Documents/ChatProject/chat-with-pdf/env/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:/opt/homebrew/sbin

Code snippet is:

 def loadPDFFile(self, filepath):
        loader = UnstructuredPDFLoader(filepath)
        document = loader.load()
        text_splitter = RecursiveCharacterTextSplitter(chunk_size=self.pdf_chunk_size, chunk_overlap=self.pdf_chunk_overlap)
        documents = text_splitter.split_documents(document)
devZ
  • 606
  • 1
  • 7
  • 23

0 Answers0