Closed GoogleCodeExporter closed 9 years ago
This is because gcalcli want to split long string into multiple lines during
layout.
And it break the string in the middle of a unicode character, thus python
complaint
incomplete unicode character.
Original comment by kuang...@gmail.com
on 8 May 2008 at 5:51
Attach the patch.
It fixes _GetCutIndex() and _GraphEvents() for utf-8 text.
Original comment by kuang...@gmail.com
on 10 May 2008 at 11:09
Attachments:
The patch didn't help. I have the same error running "gcalcli calm" on Cygwin,
Windows XP, Python 2.5 installed under Cygwin:
Traceback (most recent call last):
File "./gcalcli", line 1132, in <module>
DoooooItHippieMonster()
File "./gcalcli", line 1097, in DoooooItHippieMonster
gcal.CalQuery(args[0])
File "./gcalcli", line 837, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "./gcalcli", line 599, in _GraphEvents
cut = self._GetCutIndex(weekEventStrings[j], self.calWidth)
File "./gcalcli", line 432, in _GetCutIndex
if (wlen(string) <= width):
File "./gcalcli", line 72, in wlen
for c in unicode(text):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13:
ordinal not
in range(128)
Original comment by pavelvi...@gmail.com
on 4 Jun 2008 at 5:33
Patch didn't hep here either. Running gcalcli on OSX with python 2.5.
Original comment by h3L93.ph1l1pp@gmail.com
on 27 Jun 2008 at 6:02
Same here. Linux with python 2.5.2
Original comment by m.fellin...@gmail.com
on 2 Jul 2008 at 2:46
Still no fix?
Original comment by gerolf.z...@gmail.com
on 20 Nov 2008 at 11:36
It's the encoding again :( The bug occurs, when a strange character äöüß or
something
else is used somewhere. So one should insert .decode("utf") s everywhere,
until it
works again.
for example in my case
in gcalcli line 626 do:
' %-7s %s\n' % (tmpTimeStr, event.title.text.decode("utf")))
/G
Original comment by gerolf.z...@gmail.com
on 20 Nov 2008 at 11:52
Here is a simple patch that fixes the UnicodeDecodeError.
Original comment by marcus.n...@gmail.com
on 27 Oct 2010 at 8:37
Attachments:
How or where to I apply this patch?
Will it help me?
This is what I get
+----------+----------+----------+----------+----------+----------+----------+
|14 |15 |16 |17 |18 *** |19 |20 |
| | | | | | | |
|3:00pm | | |4:00pm Jen|12:00am |12:00am |12:00am |
|Adam's | | |over for |Forecast |Forecast |Forecast |
|b-day | | |supper |for |for |for |
|party | | | |Edmonton, |Edmonton, |Edmonton, |
| | | |6:30pm |Alberta |Alberta |Alberta |
Traceback (most recent call last):
File "/usr/local/bin/gcalcli", line 1114, in <module>
DoooooItHippieMonster()
File "/usr/local/bin/gcalcli", line 1079, in DoooooItHippieMonster
gcal.CalQuery(args[0])
File "/usr/local/bin/gcalcli", line 819, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "/usr/local/bin/gcalcli", line 594, in _GraphEvents
PrintMsg(CLR_NRM(), line + "\n")
File "/usr/local/bin/gcalcli", line 207, in PrintMsg
sys.stdout.write(msg)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/codecs.py", line 351, in write
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 133:
ordinal not in range(128)
Original comment by cksie...@gmail.com
on 19 Nov 2010 at 3:36
Original comment by eda...@insanum.com
on 31 Jul 2011 at 5:24
Original issue reported on code.google.com by
canbu...@gmail.com
on 28 Apr 2008 at 4:06