phiresky / ripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
Other
7.98k stars 172 forks source link

error windows #196

Closed fouda4ever closed 8 months ago

fouda4ever commented 9 months ago

i am trying to search for word "ich" in this path "E:\HAMO\Languages\German\Immersion\Text" but nothing shows, the folder has three epub and one pdf i install it with choco install ripgrep-all in cmd

`C:\Windows\system32>rga ich E:\HAMO\Languages\German\Immersion\Text
E:\HAMO\Languages\German\Immersion\Text\ShortStoriesinGermanforBeginners.pdf: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.9.6-x86_64-pc-windows-msvc\\rga-preproc" "E:\\HAMO\\Languages\\German\\Immersion\\Text\\ShortStoriesinGermanforBeginners.pdf"':
-------------------------------------------------------------------------------
adapter: poppler
Error: Could not find executable "pdftotext".
-------------------------------------------------------------------------------
E:\HAMO\Languages\German\Immersion\Text\Olly Richards - Short Stories in German for Intermediate Learners-John Murray Press (2021).epub: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.9.6-x86_64-pc-windows-msvc\\rga-preproc" "E:\\HAMO\\Languages\\German\\Immersion\\Text\\Olly Richards - Short Stories in German for Intermediate Learners-John Murray Press (2021).epub"':
-------------------------------------------------------------------------------
adapter: pandoc
Unknown option --atx-headers.
Try pandoc.exe --help for more information.
Error: The pipe has been ended. (os error 109)
-------------------------------------------------------------------------------
E:\HAMO\Languages\German\Immersion\Text\Richards, Olly - 101 Conversations in Intermediate German_ Short Natural Dialogues to Boost Your Confidence & Improve Your Spoken German (101 Conversations in German 2) (German Edition)-Olly Richards .epub: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.9.6-x86_64-pc-windows-msvc\\rga-preproc" "E:\\HAMO\\Languages\\German\\Immersion\\Text\\Richards, Olly - 101 Conversations in Intermediate German_ Short Natural Dialogues to Boost Your Confidence & Improve Your Spoken German (101 Conversations in German 2) (German Edition)-Olly Richards .epub"':
-------------------------------------------------------------------------------
adapter: pandoc
Unknown option --atx-headers.
Try pandoc.exe --help for more information.
Error: The pipe has been ended. (os error 109)
-------------------------------------------------------------------------------
E:\HAMO\Languages\German\Immersion\Text\Richards, Olly - 101 Conversations in Simple German_ Short Natural Dialogues to Boost Your Confidence & Improve Your Spoken German (101 Conversations in German) (German Edition)-Olly Richards Publishi.epub: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.9.6-x86_64-pc-windows-msvc\\rga-preproc" "E:\\HAMO\\Languages\\German\\Immersion\\Text\\Richards, Olly - 101 Conversations in Simple German_ Short Natural Dialogues to Boost Your Confidence & Improve Your Spoken German (101 Conversations in German) (German Edition)-Olly Richards Publishi.epub"':
-------------------------------------------------------------------------------
adapter: pandoc
Unknown option --atx-headers.
Try pandoc.exe --help for more information.
Error: The pipe has been ended. (os error 109)
-------------------------------------------------------------------------------

C:\Windows\system32>rga --rg-version
ripgrep 13.0.0 (rev af6b6c543b)
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

C:\Windows\system32>rga --rg-version
ripgrep 13.0.0 (rev af6b6c543b)
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)`
mijiyucen commented 9 months ago

@fouda4ever I encountered the same error after installation. Later, I did the following operation, However, I still got the following error:

PS C:\ProgramData\chocolatey\lib\poppler\tools> lsd
 chocolateyinstall.ps1   poppler-22.11.0-ha6c1112_0.tar   poppler-22.11.0-ha6c1112_0.tar.bz2
PS C:\ProgramData\chocolatey\lib\poppler\tools> lsd
 chocolateyinstall.ps1   info   Library   poppler-22.11.0-ha6c1112_0.tar   poppler-22.11.0-ha6c1112_0.tar.bz2
# 'choco install ripgrep-all' doesn't extract Poppler and install pdftotext to the choco's bin directory. So, I tried copying it over directly.
PS C:\ProgramData\chocolatey\lib\poppler\tools> cp .\Library\bin\pdftotext.exe ..\..\..\bin\
PS C:\ProgramData\chocolatey\lib\poppler\tools> lsd ..\..\..\bin\pdftotext.exe
 ..\..\..\bin\pdftotext.exe

PS C:\ProgramData\chocolatey\lib\poppler\tools> rga.exe  Specification  D:\spec\3gpp\ts_122071v140100p.pdf
D:\spec\3gpp\ts_122071v140100p.pdf: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.9.6-x86_64-pc-windows-msvc\\rga-preproc" "D:\\spec\\3gpp\\ts_122071v140100p.pdf"':
-------------------------------------------------------------------------------
adapter: poppler
Error: 管道已结束。 (os error 109)
-------------------------------------------------------------------------------

D:\spec\3gpp\3GPP协议编号——标准协议之3GPP标准协议.docx: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.9.6-x86_64-pc-windows-msvc\\rga-preproc" "D:\\\\spec\\3gpp\\3GPP协议编号——标准协议之3GPP标准协议.docx"':
-------------------------------------------------------------------------------
adapter: pandoc
Unknown option --atx-headers.
Try pandoc.exe --help for more information.
Error: 管道已结束。 (os error 109)
-------------------------------------------------------------------------------

I try install in the wsl, wsl same file is ok

unu@ubuntu:~$ rga Specification /mnt/d/spec/3gpp/ts_122071v140100p.pdf
Page 3: This Technical Specification (TS) has been produced by ETSI 3rd Generation Partnership Project (3GPP).
Page 7: This Technical Specification (TS) has been produced by the 3GPP.
Page 8: 3GPP TR 21.905: "Vocabulary for 3GPP Specifications".

wsl other file also have same error

unu@ubuntu:~$ rga -l Specification /mnt/d/spec/3gpp/ts_123018v140000p.pdf
/mnt/d/spec/3gpp/ts_123018v140000p.pdf:
-------------------------------------------------------------------------------
adapter: poppler
Error: Broken pipe (os error 32)
-------------------------------------------------------------------------------
phiresky commented 8 months ago

This should be fixed in 0.10.3