Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find executable pdftotext #215

Open
benmordecai opened this issue Mar 26, 2024 · 3 comments
Open

Could not find executable pdftotext #215

benmordecai opened this issue Mar 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@benmordecai
Copy link

Describe the bug
On Windows 11 powershell installed with chocolaty, rga mysearchterm in a folder of pdfs yields one error per document of the form:

D:\datasheets\Communication Interfaces\FA-ISOCON Serial RS232-RS485 Interface.pdf adapter: poppler
Error: during preprocessing

Caused by:
    0: run_adapter(D:\datasheets\Communication Interfaces\FA-ISOCON Serial RS232-RS485 Interface.pdf)
    1: adapting D:\datasheets\Communication Interfaces\FA-ISOCON Serial RS232-RS485 Interface.pdf via poppler failed
    2: Could not find executable "pdftotext".

I have explicitly installed poppler with choco install poppler and the installation was successful. Nevertheless the error remains.

It seems like rga cannot find poppler in its default installation location. Perhaps a problem with path variables but I do not know much about how Windows manages paths as I am primarily a Linux user.

Operating System and Version
Windows 11

Output of rga --version
ripgrep-all 0.10.6

Output of $Env:Path

C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Rockwell Software\RSCommon\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\ProgramData\chocolatey\lib\mpv.install\tools;C:\Program Files\dotnet\;C:\Program Files (x86)\Common Files\Rockwell\;C:\Program Files (x86)\Rockwell Software\RSCommon;C:\Program Files (x86)\Common Files\Rockwell;C:\Program Files (x86)\Rockwell Software\;C:\Program Files\Common Files\Rockwell\FTLD\;C:\Program Files (x86)\Common Files\Rockwell\FTLD\;C:\Program Files (x86)\Common Files\Rockwell\FactoryTalk Linx\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files (x86)\Rockwell Software\RSView Enterprise\;C:\Users\ben mordecai\AppData\Local\Microsoft\WindowsApps
@benmordecai benmordecai added the bug Something isn't working label Mar 26, 2024
@dcbarry
Copy link

dcbarry commented Mar 28, 2024

Exact same error, win 10, also installed by chocolately

@phiresky
Copy link
Owner

I don't know how chocolately installs things, but the pdftotext binary must be in path for rga to work.

@lafrenierejm
Copy link
Contributor

lafrenierejm commented Sep 7, 2024

@benmordecai, @dcbarry To confirm whether pdftotext is on your default PATH, please share the output of running Get-Command pdftotext in PowerShell.

If pdftotext is on your PATH, then the issue would be that the PATH is somehow being munged when rga is called. If it's not on your PATH, then the that would be the first issue to fix and might warrant reaching out to the maintainer of chocolatey's ripgrep-all package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants