0

I am getting the following when using a script with a poppler path :

pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?

But poppler is correctly installed on my computer. The code I am using is the following :

import os

path = os.path.abspath("Project/Poppler/Release-22.12.0-0/poppler-22.12.0/Library/bin")

poppler_path = path

If I try like I am getting the error but if I put the path into the variable poppler_path directly like this (I do this to get the full absolute path of the folder, if I try with the relative path it doesn't work anyway) :

poppler_path = r"C:\Users\Clement\Desktop\Project\Poppler\Release-22.12.0-0\poppler-22.12.0\Library\bin"

By doing this I don't get the error when executing my script.

How can I fix this ?

clemdcz
  • 99
  • 7
  • In your first example, show the output of poppler_path. I suspect you'll find the path you're referring to would be `C://Project/Poppler...` which isn't your poppler installation. Try changing your relative path in your first example `"../Project/Poppler/Release-22.12.0-0/poppler-22.12.0/Library/bin"` – Codesidian Jan 09 '23 at 10:03
  • In the first example, the `poppler_path` is equal to `C:\Users\Clement\Desktop\Project\Poppler\Release-22.12.0-0\poppler-22.12.0\Library\bin`. Yet it doesn't work. That's why I find it confusing – clemdcz Jan 09 '23 at 10:42

0 Answers0