My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 79: UnicodeDecodeError in icqt.py
  Back to list
Status:  Fixed
Owner:  jadest...@gmail.com
Closed:  Jan 2008


 
Reported by jadest...@gmail.com, Dec 15, 2007
 Posted by guest at 2007-07-13 10:32:35

[2007-07-13 11:57:03] Traceback (most recent call last):
          File "/usr/share/jabber-pyicq/src/tlib/oscar.py", line 647,
in dataReceived
            state=func(flap)
          File "/usr/share/jabber-pyicq/src/tlib/oscar.py", line 756,
in oscar_Data
            d.callback(snac)
          File
"/usr/lib/python2.4/site-packages/twisted/internet/defer.py", line
229, in callback
            self._startRunCallbacks(result)
          File
"/usr/lib/python2.4/site-packages/twisted/internet/defer.py", line
294, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File
"/usr/lib/python2.4/site-packages/twisted/internet/defer.py", line
307, in _runCallbacks
            self.result = callback(self.result, *args, **kw)
          File "/usr/share/jabber-pyicq/src/legacy/icqt.py", line 330,
in sendAwayPresence
            LogEvent(INFO, self.session.jabberID, "Away (%s, %s) message
%s" % (charset, msg[0], status))
        exceptions.UnicodeDecodeError: 'utf8' codec can't decode byte 0x97 in
position 19: unexpected code byte

Suggestion to fix: Replace the line with
                        status = status.decode(charset, 'replace')
                        utfmsg = unicode(msg[0], errors='replace')
                        LogEvent(INFO, self.session.jabberID, "Away (%s,
%s) message %s" % (charset, utfmsg, status))

Posted by daff at 2007-07-14 12:01:02

Great! I applied your suggested fixes (here, 321, and in 320 and 319)  and have
yet to see any unhandled exceptions! Using the latest from SVN (r228) with your
fixes and everything seems to be running smoothly.

Thanks!


Jan 19, 2008
Project Member #1 d...@jabber.fsinf.de
Probably fixed in revision 234.
Status: Fixed

Powered by Google Project Hosting