-
Notifications
You must be signed in to change notification settings - Fork 307
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
Debian LMDE + Conky + gcalcli = issue #16
Comments
Did you try the latest code in the git master branch? |
Yes. Oh, just checked right now and from command line i've good response (good calendar) - only when i run gcalcli from conky script i have that issue. |
OK, so developer wasn't very helpful and I had to find workaround:
All thanks goes to "Gilles Lenfant" (http://www.peterbe.com/plog/unicode-to-ascii#c358f0d) |
Or in PrintMsg function, after every msg one should encode to utf-8, so msg.encode("utf-8") should work properly. |
Following what is said here: http://stackoverflow.com/questions/8016236/python-unicode-handling-differences-between-print-and-sys-stdout-write class StdOut(object):
def write(self, string):
if isinstance(string, unicode):
string = string.encode(sys.__stdout__.encoding)
sys.__stdout__.write(string)
sys.stdout = StdOut() to the part just next to the Hope this helps |
@ihatelogin don't you just hate it when the developer isn't helpful? Sucks I know, but sometimes those developers are just way to busy and simple python scripts are never a priority. There was a new "--locale" option added to gcalcli. That might help address this issue. If not it is encouraged you take some time to create a github pull request that contains a proper fix. |
Got an email that unicode in the month names break the calw and calm output. Don't know if @tresni fix fixes this problem. |
Probably not, though I think I know where the issue is. I believe the |
We should probably filter all terminal output through a single function that does the proper conversions. This unicode stuff has plagued gcalcli for quite some time now. Maybe unifying the output path will help. Thoughts? |
* tag 'v2.4.2': (70 commits) Update ChangeLog for a 2.4.2 release Fix a bug where multiple events would try to print on a single line in calw & calm Make sure we are playing with unicode in all the right places Finally fix issues with unicode vs ascii. Thanks to KaiQ, DerKleineLeif, msoida, Unkuiri and everyone else who supplied information on the issues and potential solutions. Fixes insanum#8. Fixes insanum#16. Fixes insanum#62. Fix tsv output Update everything to show 2.4 release simplejson is the base for json, use stdlib if simplejson isn't there print event date as YYYY-MM-DD for the search command added link info to tsv agenda output (--detail-url=short works for tsv as well) added ability to print links for events and shorten them via goo.gl added ascii text box around description in agenda output added some flair, and NO I don't need 37 pieces of flair to express myself o.O fixed listing of location and reminder information in the agenda Whoops, should really import the real library That space was bugging me Support fuzzy dates. Fixes insanum#11. only allow reminders to be added to ics events that don't have a recurrence don't show description containing only whitespace chars added date samples in dd/mm/yyyy format updated docs on how to use the 'remind' command for event notifications ...
Hello
After switching from LinuxMint to LinuxMint Debian Edition I've got a problem with gcalcli.
After little investigation I've founded cause (copied below).
I'll be much appreciated for any help
Best regards to all.
My error:
Conky: desktop window (10000a5) is subwindow of root window (be)
Conky: window type - override
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1529, in
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1474, in BowChickaWowWow
gcal.CalQuery(args[0], count=int(args[1]))
File "/usr/bin/gcalcli", line 1007, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "/usr/bin/gcalcli", line 692, in _GraphEvents
PrintMsg(CLR_NRM(), line + "\n")
File "/usr/bin/gcalcli", line 232, in PrintMsg
sys.stdout.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0144' in position 95: ordinal not in range(128)
The text was updated successfully, but these errors were encountered: