Hi, when I log in with amsn2 I get an exception in pymsn: Traceback (most recent call last): File "./pymsn/pymsn/msnp/base.py", line 106, in _dispatch_command handler(command) File "./pymsn/pymsn/msnp/notification.py", line 485, in _handle_MSG self._client.oim_box.sync(mail_data) File "./pymsn/pymsn/service/OfflineIM/offline_messages_box.py", line 247, in sync self.__parse_metadata(xml_data) File "./pymsn/pymsn/service/OfflineIM/offline_messages_box.py", line 267, in __parse_metadata search_by_network_id(network_id)[0] UnboundLocalError: local variable 'network_id' referenced before assignment
Looking at the code the culprit is this: network = (m.findtext('T','int'), m.findtext('S','int')) if network == (11,6): network_id = NetworkID.MSN elif network == (13,7): network_id = NetworkID.EXTERNAL [code goes on doing other things] as you can see, if network has a value which is not (11,6) or (13,7) network_id is not set, so the following code fails. My XML is this (email addresses censored, indentation added by me): <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-03-08T11:35:26.830Z</RT> <RS>0</RS> <SZ>1352</SZ> <E>xxx...@hotmail.it</E> <I>1147F0EF-5BBC-4B43-AE09-2B0714993B6B</I> <F>00000000-0000-0000-0000-000000000009</F> <N>=?utf-8?B?R2l1c3k=?=</N> </M> <M> <T>11</T> <S>7</S> <RT>2009-03-21T19:49:31.663Z</RT> <RS>0</RS> <SZ>1084</SZ> <E>xxx...@hotmail.com</E> <I>EF1B4205-A0D1-4EB9-9579-4AA03A470805</I> <F>00000000-0000-0000-0000-000000000009</F> <N>=?utf-8?B?Z2l1c2VwcGU=?=</N> </M> </MD> This means that the network variable is set to (11,7). Now I have no idea what this means and neither does msnpiki (http://msnpiki.msnfanatic.com/index.php/MSNP13:Offline_IM#Meaning_of_the_fields) and I have no idea what will change in pymsn by setting network_id to something inaccurate. For now I did a quick fix which I believe should be correct, but I'll need someone's wisdom on the MSNP (Youness? :D ) to check and possibly correct it. The patch is this: http://github.com/Kjir/amsn2/commit/cd959b451ff18e4f73a4a62a0d4ec5a5abb7af14 Thanks -- Stéphane ------------------------------------------------------------------------------ _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel