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

Broken pipe error on Buku #520

Closed
ReneFroger opened this issue Jun 21, 2021 · 19 comments
Closed

Broken pipe error on Buku #520

ReneFroger opened this issue Jun 21, 2021 · 19 comments

Comments

@ReneFroger
Copy link

ReneFroger commented Jun 21, 2021

Specs

I use Ubuntu 20.04.2 LTS as operating system.
The Buku version is 4.6
Python 2.7.18 and Python 3.8.5

Issue

When I start Buku, it works fine. But I like to filter my results. So I usually use oil -p to filter my Buku database.

However, it's not working anymore with the buku database. I get a error instead:

Traceback (most recent call last): File "/usr/local/bin/buku", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/buku.py", line 5707, in main bdb.print_rec(0) File "/usr/local/lib/python3.8/dist-packages/buku.py", line 1835, in print_rec print(format_json(resultset, field_filter=self.field_filter)) BrokenPipeError: [Errno 32] Broken pipe

Any idea what might cause this issue? Reinstalling Buku via pip3 didn't help much in this case.

@jarun
Copy link
Owner

jarun commented Jun 22, 2021

Please check if any of the latest changes starting from May 14 to the release (not too many of them) has broken this.

@jarun
Copy link
Owner

jarun commented Jun 22, 2021

@AndreiUlmeyda can you please have a look too?

@jarun
Copy link
Owner

jarun commented Jun 22, 2021

I tried it and it seems the issue exists on earlier releases also. We'll have to wait for the oil author.

@ReneFroger
Copy link
Author

@jarun thanks for confirming the issue is not on my side. I'll wait for any reaction from @AndreiUlmeyda

@jarun
Copy link
Owner

jarun commented Jun 22, 2021

I tried the following which involves piped input/output and I don't see any issues:

echo "hello" | ./buku -j --np | less -iR

@jarun
Copy link
Owner

jarun commented Jun 22, 2021

I have added exception handling for the error at commit e708847. See if it helps.

@ReneFroger
Copy link
Author

ReneFroger commented Jun 22, 2021

I cloned the repository, recompiled again with sudo make install, then replaced /usr/bin/local/buku with the recompiled version (with execution rights passed with chmod +x).

Then I tried again with oil -p and this time the error message is different now. Oil screen is empty.

/usr/bin/env: use -[v]S to pass options in shebang lines

In oil. Then I quit, and see the following in terminal:

/usr/bin/env: ‘jq -fr’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines
/usr/bin/env: ‘awk -f’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines

But when I start buku, he is able to find the bookmarks. So the database is not missing, but Oil seems not be able to find it anymore after your patch.

@ReneFroger
Copy link
Author

I tried the following which involves piped input/output and I don't see any issues:

echo "hello" | ./buku -j --np | less -iR

I got this with your flags:
buku: waiting for input (unexpected? try --nostdin)

@jarun
Copy link
Owner

jarun commented Jun 22, 2021

So the database is not missing, but Oil seems not be able to find it anymore after your patch.

I am not sure if it was finding earlier as well. Maybe it didn't find any results, quit and we saw the broken pipe error.

I got this with your flags

Do you have any bookmark with the string hello?

@ReneFroger
Copy link
Author

No. But when I search on other strings which I have in my buku bookmarks, the list stays empty.

@ReneFroger
Copy link
Author

On my other computer, I have a older version (less than a year old, I believe) of Buku running. oil -p is working fine with the Buku bookmarks. So I suspect some changes in the latest versions might cause this issue.

@jarun
Copy link
Owner

jarun commented Jun 22, 2021

Possible. Maybe some API change has broken it. But the app needs to update too.

With this confirmation, I am closing this defect. If the author of oil gets back on this, we can dig in further.

@jarun jarun closed this as completed Jun 22, 2021
@jarun
Copy link
Owner

jarun commented Jun 23, 2021

For an alternative using fzf, please check step 7 in Quickstart: https://github.com/jarun/buku#quickstart

@ReneFroger
Copy link
Author

I tried FZF, but I'm missing the tags, categories and everything from Buku. So I would prefer to keep oil -p.

@jarun you don't have this issue when reinstalling Oil again from latest release?

@AndreiUlmeyda perhaps is there something you could do, since the latest release of Buku broke the oil package?

@AndreiUlmeyda
Copy link

Hey there, everybody. Thanks, sincerely, for the patience. I'm struggling to take time to look into it but there should be no excuse. I will try to replicate and fix the issue on thursday night and/or over the weekend. See you then and have a wonderful time.

@ReneFroger
Copy link
Author

ReneFroger commented Jun 29, 2021

That would be wonderful! I appreciate that. Let me know if I could assist you in anything. @jarun perhaps open this issue so that we could dig in further?

@jarun
Copy link
Owner

jarun commented Jun 29, 2021

@jarun perhaps open this issue so that we could dig in further?

I still think oil would have to update a bit to catch up with buku. Let's wait for @AndreiUlmeyda.

@AndreiUlmeyda
Copy link

Hey there, I got started but haven't replicated the issue yet. Progress will be tracked here. Cheers

@ReneFroger
Copy link
Author

I'll reply in the other issue :)

@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants