Bug 27556 - telepathy-butterfly crashed with ValueError in __parse()
Summary: telepathy-butterfly crashed with ValueError in __parse()
Status: RESOLVED FIXED
Alias: None
Product: papyon
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-09 06:38 UTC by Sebastien Bacher
Modified: 2010-04-14 07:29 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Sebastien Bacher 2010-04-09 06:38:16 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/telepathy-butterfly/+bug/558493

"While running in the background, empathy messenger crashed.

telepathy-butterfly 0.5.7-0ubuntu1

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/papyon/switchboard_manager.py", line 370, in _sb_message_received
    handler._on_message_received(message)
  File "/usr/lib/pymodules/python2.6/papyon/conversation.py", line 353, in _on_message_received
    TextFormat.parse(message_formatting),
  File "/usr/lib/pymodules/python2.6/papyon/conversation.py", line 186, in parse
    text_format.__parse(format)
  File "/usr/lib/pymodules/python2.6/papyon/conversation.py", line 231, in __parse
    for p in property.split('=', 1)]
ValueError: need more than 1 value to unpack"
Comment 1 Jonny Lamb 2010-04-09 08:09:46 UTC
I need the butterfly log for just before this traceback.
Comment 2 William Grant 2010-04-14 06:32:15 UTC
This happens every time I receive a message from a particular contact at the moment. Said contact is using eBuddy right now.

This is an example message:

<<< MSG <redacted email> <redacted name> 160

 X-MMS-IM-Format: 'FN=Arial; EF=; CO=000000; CS=0; PF=00; RL=0;'\r\n
 Content-Type: 'text/plain; charset=UTF-8'\r\n
 MIME-Version: '1.0'\r\n
 \r\n
 <redacted plaintext message body>

I suspect that the trailing semicolon on X-MMS-IM-Format is to blame -- adding an emptiness check like this fixes it:

    def __parse(self, format):
        for property in format.split(';'):
            if not property:
                continue
            key, value = [p.strip(' \t|').upper() \
                    for p in property.split('=', 1)]
Comment 3 Jonny Lamb 2010-04-14 07:29:40 UTC
Good catch, thanks! I merged your patch to master:

http://git.collabora.co.uk/?p=papyon.git;a=commitdiff;h=ffb93617a


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.