Closed GoogleCodeExporter closed 9 years ago
I have the same problem. I tried to look in to the UTF-8 stuff but it's quite
confusing. As a workaround I created the attached patch.
Original comment by daniel.w...@gmail.com
on 15 Nov 2011 at 5:19
Attachments:
I guess it was my fault for adopting a unicode-support patch ;)
I have just now pushed fix for this version into Debian and you can see
complete patch related to this issue at
http://git.onerussian.com/?p=deb/gcalcli.git;a=blob;f=debian/patches/up_unicode_
support;h=511c2c6b6824a1d350144c173b19a227975f9c3f;hb=refs/heads/debian
Cheers
Original comment by yarikop...@gmail.com
on 22 Nov 2011 at 11:52
Patch in comment 1 solved my pb which corresponds to Issue 10.
Thanks.
Traceback (most recent call last):
File "gcalcli", line 1512, in <module>
BowChickaWowWow()
File "gcalcli", line 1459, in BowChickaWowWow
gcal.CalQuery(args[0])
File "gcalcli", line 999, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "gcalcli", line 700, in _GraphEvents
PrintMsg(CLR_NRM(), line + "\n")
File "gcalcli", line 230, in PrintMsg
sys.stdout.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position
158: ordinal not in range(128)
Original comment by aaforti...@gmail.com
on 20 Jan 2012 at 9:02
Yaroslav, your patch only fixes the issue for python2.7.
In 2.6 (Debian Squeeze), it still throws an exception:
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1525, in <module>
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1470, in BowChickaWowWow
gcal.CalQuery(args[0], count=int(args[1]))
File "/usr/bin/gcalcli", line 1012, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "/usr/bin/gcalcli", line 713, in _GraphEvents
PrintMsg(CLR_NRM(), line + "\n")
File "/usr/bin/gcalcli", line 236, in PrintMsg
sys.stdout.write(cunicode(msg))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in position
98: ordinal not in range(128)
the fix is to use "print" instead of "sys.stdout.write" as suggested in comment
1.
Original comment by zhen...@gmail.com
on 10 Apr 2012 at 1:56
I still have this issue with gcalcli 2.1-2, installed via the Ubuntu
repositories, and running Ubuntu 12.04. FWIW I have python 2.7. I do not have
non-unicode characters in my calendar. I created a reduced test case for you to
troubleshoot. (Feel free to modify the google calendar as you please.) Running
"$ gcalcli --user gcalclitest --pw gcalclitest1 calw 2" works fine, but "$
gcalcli --nc --user gcalclitest --pw gcalclitest1 calw 2" fails with:
+----------+----------+----------+----------+----------+----------+----------+
|Sunday |Monday |Tuesday |Wednesday |Thursday |Friday |Saturday |
+----------+----------+----------+----------+----------+----------+----------+
|06 May |07 May |08 May |09 May ** |10 May |11 May |12 May |
| | | | | | | |
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1524, in <module>
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1469, in BowChickaWowWow
gcal.CalQuery(args[0], count=int(args[1]))
File "/usr/bin/gcalcli", line 1011, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "/usr/bin/gcalcli", line 712, in _GraphEvents
PrintMsg(CLR_NRM(), line + "\n")
File "/usr/bin/gcalcli", line 239, in PrintMsg
sys.stdout.write(unicode(msg, 'UTF-8'))
TypeError: decoding Unicode is not supported
Original comment by gcalclit...@gmail.com
on 8 May 2012 at 10:38
See defect #81
Original comment by cxm...@gmail.com
on 13 May 2012 at 8:15
gcalcli moved to github: https://github.com/insanum/gcalcli
This issue has already been brought up there.
Original comment by eda...@insanum.com
on 15 May 2012 at 3:04
gcalcli --nc --24hr calw
+----------+----------+----------+----------+----------+----------+----------+
|Sunday |Monday |Tuesday |Wednesday |Thursday |Friday |Saturday |
+----------+----------+----------+----------+----------+----------+----------+
|22 Dec |23 Dec |24 Dec |25 Dec |26 Dec ** |27 Dec |28 Dec |
| | | | | | | |
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1524, in <module>
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1471, in BowChickaWowWow
gcal.CalQuery(args[0])
File "/usr/bin/gcalcli", line 1011, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "/usr/bin/gcalcli", line 712, in _GraphEvents
PrintMsg(CLR_NRM(), line + "\n")
File "/usr/bin/gcalcli", line 239, in PrintMsg
sys.stdout.write(unicode(msg, 'UTF-8'))
TypeError: decoding Unicode is not supported
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
when:
-gcalcli --24hr calw
-gcalcli --nc --24hr agenda
-gcalcli --24hr agenda
are OK.
Original comment by wojtekbu...@gmail.com
on 26 Dec 2013 at 11:47
Please read the previous comment... :-(
Original comment by eda...@insanum.com
on 27 Dec 2013 at 4:33
Original issue reported on code.google.com by
tkp...@gmail.com
on 14 Nov 2011 at 11:46