Hi back, I think I found a bug.
I'm not directly running papyon but I'm running pymsn with some patches applied (from papyon of course).
I get an error when connecting, related to an offline message (I'm using it through telepathy butterfly):
DEBUG:Transport:<<< CHG 9 HDN 1879048192
DEBUG:Transport:<<< CHG 9 HDN 1879048192
DEBUG:Transport:<<< MSG Hotmail Hotmail
MIME-Version: 1.0\r\n
Content-Type: text/x-msmsgsinitialmdatanotification; charset=UTF-8\r\n
\r\n
Mail-Data: <MD><E><I>0</I><IU>0</IU><O>0</O><OU>0</OU></E><Q><QTM>409600</QTM><QNM>204800</QNM></Q><M><T>11</T><S>7</S><RT>2009-06-29T10:39:02.807Z</RT><RS>0</RS><SZ>995</SZ><E>PRIVACY_REMOVED_BY_ME@gmail.com</E><I>3EA642F7-FECF-46CA-A12C-759D8171D16F</I><F>00000000-0000-0000-0000-000000000009</F><N>PRIVACY_REMOVED_BY_ME@gmail.com</N></M></MD>\r\n
Inbox-URL: /cgi-bin/HoTMaiL\r\n
Folders-URL: /cgi-bin/folders\r\n
Post-URL: http://www.hotmail.com\r\n
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/pymsn/msnp/base.py", line 106, in _dispatch_command
handler(command)
File "/usr/lib/python2.6/dist-packages/pymsn/msnp/notification.py", line 485, in _handle_MSG
self._client.oim_box.sync(mail_data)
File "/usr/lib/python2.6/dist-packages/pymsn/service/OfflineIM/offline_messages_box.py", line 247, in sync
self.__parse_metadata(xml_data)
File "/usr/lib/python2.6/dist-packages/pymsn/service/OfflineIM/offline_messages_box.py", line 278, in __parse_metadata
name += part[0].decode(part[1])
TypeError: decode() argument 1 must be string, not None
And this is the code that I have in /usr/share/pyshared/pymsn/service/OfflineIM/offline_messages_box.py that should be the same of papyon:
def __parse_metadata(self, xml_data):
metadata = Metadata(xml_data)
for m in metadata.findall('./M'):
id = m.findtext('./I')
network = m.findtext('T','int')
if network == 11:
network_id = NetworkID.MSN
elif network == 13:
network_id = NetworkID.EXTERNAL
else:
# FIXME: Setting a default value for network_id. Is NetworkID.MSN the correct value?
network_id = NetworkID.MSN
account = m.findtext('./E')
try:
sender = self._client.address_book.contacts.\
search_by_account(account).\
search_by_network_id(network_id)[0]
except IndexError:
sender = None
# Get the name of the sender
name = m.findtext('./N');
# Decode it according to RFC 2047
from email.header import decode_header
parts = decode_header(name)
name = ''
for part in parts:
name += part[0].decode(part[1])
date = m.find('./RT')
if date is not None:
date = date.text
self.__messages.add(OfflineMessage(id, sender, name, date))
self._state = OfflineMessagesBoxState.SYNCHRONIZED
if len(self.__messages) > 0:
self.emit('messages-received', self.__messages)