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

copy text from google breaks clipster with python2 #32

Closed
magnetophon opened this issue Jan 10, 2017 · 4 comments
Closed

copy text from google breaks clipster with python2 #32

magnetophon opened this issue Jan 10, 2017 · 4 comments

Comments

@magnetophon
Copy link

Thanks for making clipster!

When I copy a text from google search results, clipster -d -l DEBUG goes into an endless loop, presumably because of #1.
When I build clipster with python3, all is fine.

@magnetophon magnetophon changed the title copy txt from google breks clipster with python2 copy text from google breaks clipster with python2 Jan 10, 2017
magnetophon added a commit to magnetophon/nixpkgs that referenced this issue Jan 10, 2017
@mrichar1
Copy link
Owner

Hi - thanks for reporting this bug. I've just had a quick test of this and I can't seem to replicate the issue.

Can you provide the following:

  1. Name and version of the browser you're using.
  2. Exact steps to make the search and select in google.
  3. The DEBUG messages (at least one loop's worth) from clipster.

Thanks!

@magnetophon
Copy link
Author

magnetophon commented Jan 11, 2017

I've tried to work out a minimal case, but I'm sorry to say I haven't found exactly how to trigger it.
This is the closest I've gotten:

  1. Firefox 49.0 on NixOS, with a fresh new profile.

a) go to google.com
b) search clipster
c) select some text with the mouse. clipster is fine
d) again select some text with the mouse. clipster goes wild.
3) http://pastebin.com/Nxg4dyCt

After this, I get an empty menu when running: clipster -o -n 200 -0 | rofi -i -dmenu -sep '\x00' -eh 2 -p paste: | tr -d '\n' | clipster.
On the other hand, clipster -cs still works fine.
After I delete the history file and rerun the daemon, both commands work again.

I just double-checked with python3, and it turns out that clipster doesn't go into an endless loop, but it does still produce an empty rofi menu when following the above steps.

@mrichar1
Copy link
Owner

mrichar1 commented Jan 12, 2017

Thanks for this - line 35 of the full logs provided the clue to (yet another instance) where unicode wasn't handled properly for 2.x:

 if self.read_board(boards[0]) != text:

This failure meant the clipboard contents never matched and it got stuck in a loop copying back and forth between boards.

This should now be fixed in 9848f06.

Please grab the latest version of clipster and let me know if this fixes the bug for you.

Thanks!

@magnetophon
Copy link
Author

magnetophon commented Jan 13, 2017

Thanks, that fixes it.
I still get an empty rofi menu sometimes, but I'll open a new issue for that when I have a bit more concrete information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants