telepathy-butterfly crashed with UnicodeDecodeError in _print_MSG()

Bug #432558 reported by Aurélien Paulus
272
This bug affects 52 people
Affects Status Importance Assigned to Milestone
telepathy-butterfly
Fix Released
Medium
telepathy-butterfly (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: telepathy-butterfly

I just configured my Empathy account with a Google Talk account and an Microsoft Live account and it makes me this bug.

ProblemType: Crash
Architecture: amd64
Date: Fri Sep 18 17:41:04 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/lib/telepathy/telepathy-butterfly
InterpreterPath: /usr/bin/python2.6
NonfreeKernelModules: wl
Package: telepathy-butterfly 0.5.0-0ubuntu2
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/lib/telepathy/telepathy-butterfly
ProcEnviron:
 SHELL=/bin/bash
 LANG=fr_BE.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-10.34-generic
PythonArgs: ['/usr/lib/telepathy/telepathy-butterfly']
SourcePackage: telepathy-butterfly
Title: telepathy-butterfly crashed with UnicodeDecodeError in _print_MSG()
Uname: Linux 2.6.31-10-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Aurélien Paulus (paupoo) wrote :
tags: removed: need-duplicate-check
Revision history for this message
In , João Pinto (joaopinto) wrote :

Here is the tracbeack from butterfly (using :papyon-0.4.2)

DEBUG:papyon.transport:<<< USR 6 OK <email address hidden> 1 0
DEBUG:papyon.transport:<<< SBS 0 null
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/papyon/transport.py", line 337, in __on_received
    logger.debug('<<< ' + unicode(cmd))
  File "/usr/lib/pymodules/python2.6/papyon/msnp/command.py", line 222, in __unicode__
    return unicode(CommandPrinter(self))
  File "/usr/lib/pymodules/python2.6/papyon/msnp/command.py", line 36, in __unicode__
    return printer()
  File "/usr/lib/pymodules/python2.6/papyon/msnp/command.py", line 60, in _print_MSG
    result += payload
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 213: ordinal not in range(128)

The problem seems to be related to my nickname:
Nickname: João

Revision history for this message
In , Olivier Le Thanh Duong (olethanh) wrote :

This was caused by our reimplementation of repr in msn.Message leaving some unicode cha.
Branch to fix this
http://git.collabora.co.uk/?p=user/olethanh/papyon.git;a=shortlog;h=refs/heads/fix_24223

Revision history for this message
In , Olivier Le Thanh Duong (olethanh) wrote :

Branch Merged

C de-Avillez (hggdh2)
visibility: private → public
Revision history for this message
João Pinto (joaopinto) wrote :

There is a patch available from: http://bugs.freedesktop.org/show_bug.cgi?id=24223 .
I have tested it and works.

Changed in telepathy-butterfly:
status: Unknown → Fix Released
Revision history for this message
Mingming Ren (portis25) wrote :

After applying that patch, I can login to MSN, but I still get a crash:

telepathy-butterfly crashed with UnicodeDecodeError in <lambda>()

Revision history for this message
AndreK (andre-k) wrote :

after todays telepathy-butterfly update, the problem remains...

Revision history for this message
Olivier Le Thanh Duong (olethanh) wrote :

@Mingming > That's a separate bug see Bug #411805
@AndreD > The bug has been fixed in git upstream only. Ubuntu packager still need to backport the patch to the papyon version they are using

Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

Oh... this is bug 439638. I unsubscribe the sponsors team here then.

Revision history for this message
Jacob Emcken (jacob-emcken) wrote :

~/papyon [master] $ git log -p -1
commit bc69834f24838ed10de20da358dda9ecdcaf2873
Author: Olivier Le Thanh Duong <email address hidden>
Date: Wed Sep 30 21:40:38 2009 +0200

    Fix crash when printing unicode char in message headers (fd.o #24223)

    Call repr() on headers' values in our re-implementation of Message.__repr__
    to avoid an UnicodeDecodeException when logging

diff --git a/papyon/msnp/message.py b/papyon/msnp/message.py
index 92e95e1..506737c 100644
--- a/papyon/msnp/message.py
+++ b/papyon/msnp/message.py
@@ -69,7 +69,7 @@ class Message(HTTPMessage):
         """Represents the payload of the message"""
         message = ''
         for header_name, header_value in self.headers.iteritems():
- message += '\t%s: %s\\r\\n\n' % (header_name, header_value)
+ message += '\t%s: %s\\r\\n\n' % (header_name, repr(header_value))
         message += '\t\\r\\n\n'
         if self.headers['Content-Type'] != "application/x-msnmsgrp2p":
             message += '\t' + debug.escape_string(self.body).\

Revision history for this message
abujafar (abujafar) wrote :

I still have the problem. Has an updated package been released for this issue?

Revision history for this message
Stéphane Maniaci (stephh) wrote :

Can someone upload a new package so that we can track bug in butterfly before Karmic get released ? Thanks !

Revision history for this message
Sebastien Bacher (seb128) wrote :

the change has been uploaded now

Changed in telepathy-butterfly (Ubuntu):
importance: Undecided → Low
status: New → Fix Released
Revision history for this message
Sesise (serasise) wrote :

lastest update and problem persist

Revision history for this message
deinonychai (deinonychai-gmail) wrote : Re: [Bug 432558] Re: telepathy-butterfly crashed with UnicodeDecodeError in _print_MSG()

The problem seems to persist on my machine as well. At the same time,
however, Empathy will now load all of my IM accounts: before it would
not load my MSN protocol. The error still comes up, but doesn't seem
to cause any service-affecting troubles.

Changed in telepathy-butterfly:
importance: Unknown → Medium
Changed in telepathy-butterfly:
importance: Medium → Unknown
Changed in telepathy-butterfly:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.