-
Notifications
You must be signed in to change notification settings - Fork 181
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
Getting error: "adapter: poppler Error: Broken pipe" #113
Comments
please send an example pdf file and show the output of |
The output of The error happens for example for |
I can't reproduce the issue, for me |
|
I got the very same behavior since some weeks (but I only realize now because I use rga along with fzf and the latter doesn't output any error). Everything is working fine except
I can't find out if some libs have been upgraded... |
I can't see anything in the changelog of ripgrep, but this could happen if ripgrep stops reading from the preprocessor once it finds the first match when using the |
This comment has been minimized.
This comment has been minimized.
So today I tested with 6 fresh new pdf files. I named those files 1. first attempt with ❯ rga --files-with-matches "essai"
5.pdf:
-------------------------------------------------------------------------------
adapter: poppler
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/adapters/spawning.rs:93:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', src/adapters/spawning.rs:92:5
-------------------------------------------------------------------------------
2.pdf:
-------------------------------------------------------------------------------
adapter: poppler
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/adapters/spawning.rs:93:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', src/adapters/spawning.rs:92:5
-------------------------------------------------------------------------------
6.pdf:
-------------------------------------------------------------------------------
adapter: poppler
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "could not finish zstd"', src/preproc.rs:117:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
-------------------------------------------------------------------------------
4.pdf:
-------------------------------------------------------------------------------
adapter: poppler
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/adapters/spawning.rs:93:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', src/adapters/spawning.rs:92:5
-------------------------------------------------------------------------------
1.pdf:
-------------------------------------------------------------------------------
adapter: poppler
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/adapters/spawning.rs:93:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', src/adapters/spawning.rs:92:5
------------------------------------------------------------------------------- 2. second attempt without ❯ rga "essai"
4.pdf
Page 6: tâches ont conduit à de nécessaires précisions dans des textes ultérieurs, tant
Page 12: HUGHES E.C. (1996), Le Regard sociologique. Essais choisis, Éditions de
6.pdf
Page 17: deviennent le monopole des journalistes et autres essayistes, il faut cesser de considérer l’empathie comme une condition nécessaire pour
2.pdf
Page 4: pénale essaie désormais d’agir le plus
Page 5: 16 octobre 2020 prescrivant les mesures générales nécessaires pour faire face à l’épidémie
5.pdf
Page 7: sur un sujet donné, les dirigeants du think tank essaient d’identifier des experts
Page 15: d’une dimension qui légitime le dessaisissement du traitement du problème par
Page 22: par Terra Nova, le capital symbolique (Sapiro, 2009) nécessaire à des interventions individuelles (signature de tribune dans la presse, invitation à la télévision
Page 25: Eymeri-Douzans J.-M., 2010, « Ce que faire l’expert pour la Commission européenne veut dire. Essai d’auto-analyse d’une trajectoire de socialisation », in
1.pdf
Page 5: légitimes ». Cf. Hughes (H.), Le regard sociologique. Essais choisis, Paris, Éditions de l’EHESS, 1996, p. 157.
Page 7: 20. Muller (P.), Le technocrate et le paysan. Essai sur la politique française de modernisation de l’agriculture de
Page 9: pour lesquels ils ne disposaient que de toutes petites lignes budgétaires expérimentales… Et dès […] qu’il devient nécessaire de re-financer 20 000 contrats
Page 10: « rigueur » favorise une phase d’« essaimage » de ces initiatives, qui aboutit à la
Page 20: avec d’autres, en son temps, L’ABC du créateur, bon on essaie de vulgariser les
Page 23: financements publics nécessaires à la pérennisation de leur propre poste. 3. third attempt with ❯ rga --files-with-matches "essai"
2.pdf
1.pdf:
-------------------------------------------------------------------------------
adapter: poppler
Error: Broken pipe (os error 32)
-------------------------------------------------------------------------------
4.pdf
6.pdf
5.pdf:
-------------------------------------------------------------------------------
adapter: poppler
Error: Broken pipe (os error 32)
------------------------------------------------------------------------------- So it's getting better after a first |
I am getting same error. 1.
|
However, the problem seems gone in master, where |
I use like this without using --files-with-matches:. I'm using fish shell on Mac. #!/opt/homebrew//bin/fish |
I'm having the exact same issue as @Ornanovitch in #113 (comment) Getting this error for every pdf at the first try (or when running with
Running with
After running without
All installed from |
I had this same issue with the version provided on the ArchLinux repository (0.9.6). Installing from master branch solved the issue. However the master branch has the peculiarity of not showing page-numbers with the results, for some reason. So I (admittedly) duct-taped a "solution" (or to be more honest: a hack) where my rga-fzf command uses a locally stored version of the rga from the master branch to list the files with |
can you share your rga-fzf function ? and how to get those two different versions of rga you mentioned ? Thanks !
|
Not the original poster, but the way I did it is super simple:
the rga-fzf shell function is exactly the same as the one in this repo's readme; except the first rga command uses master
I poked at the code at bit to see why it no longer works; looks like there was a major refactoring at some point and the poppler adapter has now moved into adapters/custom.rs for some reason; and this functionality just hasn't been added back yet:
https://github.com/phiresky/ripgrep-all/blob/master/src/adapters/custom.rs old code: ripgrep-all/src/adapters/poppler.rs Line 58 in 291033b
|
I build from tag v0.9.6 like this and error disappear without behavior change. |
FWIW for anyone else who comes across this. I'm on OSX 12.6 and it wasn't working after installing with brew (including uninstalling & reinstalling everything). But jonaustin's 30 Jun post did the job: clone the repo, install with cargo. It even added it to the path and everything so 'rga' at the terminal just works. rga-fzf too. |
brew install rga --HEAD |
I just ran into this, too. Any progress on this? |
What progress do you need, if you always can install the recent (--HEAD) version? |
Using the function in this comment is still better because the current version still doesn't return page numbers with the search: #113 (comment) |
Thank you for letting know. |
I'm trying to get this to work in termux as I have all my pdfs on my phone.
Do you mean the function with two different versions as posted by you? |
Yeah (I mean it's better if you want the page numbers for each search result anyway). No idea about termux. Neat though; post back if/how you get it working. |
Sure, I've never built anything with/for termux so this is gonna take a while, but if I get it working I'll post back. |
Fixed in 0.10 |
After the command rga --files-with-matches "search-term", I get for almost all the pdf files I have in my directory the error:
For some files it also says:
I have no idea what causes this error.
The text was updated successfully, but these errors were encountered: