Comments (7)
I just tested the new version, and it works perfectly! :)
Thank you!
from clipster.
This is a unicode issue - there are many of them, and they almost all originate in python2. (See #1)
I can't immediately replicate this issue with my own unicode tests (though I did find yet another one while looking!) - perhaps you can provide some more debugging (clipboard history, debug output etc) ?
Otherwise, I can only suggest running clipster with python3 and seeing if this fixes the problem.
from clipster.
I think it is enough to copy one of the common umlauts (ü, ö, ä) to break roficlip. I have not found anything more "advanced" in my history.
Logging at debug level only yields the same error:
DEBUG:Connecting to server to query history.
DEBUG:Sending request to server.
DEBUG:Received data from server.
DEBUG:Received data from server.
DEBUG:Received data from server.
Traceback (most recent call last):
File "/usr/local/bin/clipster", line 854, in <module>
main()
File "/usr/local/bin/clipster", line 837, in main
print(client.output(), end='')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 1103: ordinal not in range(128)
Happily, forcing clipster to Python 3 solves the problem :)
from clipster.
Hi,
Thanks for the reply. I can't get clipster to break using simple accented characters, but then it may be an extra interaction with roficlip that means I'm not seeing it. Can you confirm that you're using the latest clipster from the master
branch?
If so, then I'm a bit stuck as to where in the code this issue lies, and I might just have to 'chicken out' of doing any more debugging on this, and just keep 'use python 3' as the solution!
from clipster.
I just tried it again with the latest version (I was on the July version beforehand), but the behavior has not changed. What I find very interesting is that the command clipster -c -o -n 500 -0
can be called correctly from the console, but if roficlip calls it, it ends in the described error.
Could it be that the execution from the console has some environment variable that the call from roficlip is missing? But how would Python 3 change that?
In any case, thanks for your help and the clipboard manager! :)
from clipster.
OK - that's good to know - and doubly useful to know it's aroficlip/clipster interaction bug, and that it works fine from the console. That should help with my debugging!
from clipster.
OK - I figured it out. I was wrongly assuming that the issue was with clipster interacting with the clipboard buffers, or between the client and the server.
Turns out that it was actually down to the print
method's behaviour when run non-interactively, it looks like it doesn't know what terminal it is interacting with, and assumes everything is ascii, and crashes.
Explicitly converting the output to utf-8 before printing seems to have fixed this issue.
Let me know if you are still seeing this problem with the latest version.
from clipster.
Related Issues (20)
- Clipster crashes when deleting multiple entries quickly from selection window HOT 2
- Clipster doesn't capture when using `Gtk.Clipboard`'s `set_text` to copy (in Python) HOT 1
- Packaging up a 2.0.2 release HOT 3
- --daemon doesn't make clipster run in background HOT 2
- sync_selections + pattern_as_selection = infinite loop HOT 1
- Clear clipboard after a configurable period of time HOT 1
- enable option -N for input HOT 1
- CLI output problems
- Feature request(s): unidirectional sync, sync without history HOT 4
- deprecation warnings when running the deamon HOT 2
- Clipboard is not replaced when selecting item from history HOT 4
- disable middle mouse button as paste HOT 2
- Gtk-WARNING: Theme parsing error HOT 1
- Question: Any plans on python3 ? HOT 1
- [Errno 2] No such file or directory: '/run/user/0/clipster.pid' HOT 1
- warnings HOT 2
- Infinite loop on re.findall HOT 4
- No Encoding Declared with Python2
- the config file does not work HOT 4
- Empty history JSON file crashes clipster HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clipster.