Hi Vladimir, On Tue, Aug 15, 2006 at 03:22:53PM +0200, Vladimir Vrzic wrote: > Since yesterday, PyMSN 0.10.3 shows strange behaviour. The contacts keep > appearing offline, then back online. The exception log is in the > attachment.
Stian reported [1] this issue with 0.11.2-dev a couple of days ago - apparently the MSN servers had a minor update to the protocol. I've attached a backport for 0.10.3 of the patch for this issue. Best regards, Lars [1] http://modevia.com/pipermail/py-transports/2006-August/003167.html -------------- next part -------------- Index: src/tlib/msn.py =================================================================== --- src/tlib/msn.py (revision 226) +++ src/tlib/msn.py (working copy) @@ -964,7 +964,8 @@ msnContact.status = params[1] msnContact.screenName = unquote(params[3]) if len(params) > 4: msnContact.caps = int(params[4]) - if len(params) > 5: self.handleAvatarHelper(msnContact, params[5]) + if len(params) > 5 and params[5] != "0": + self.handleAvatarHelper(msnContact, params[5]) self.contactStatusChanged(params[1], params[2], unquote(params[3])) def handleAvatarHelper(self, msnContact, msnobjStr): @@ -993,7 +994,8 @@ msnContact.status = params[0] msnContact.screenName = unquote(params[2]) if len(params) > 3: msnContact.caps = int(params[3]) - if len(params) > 4: self.handleAvatarHelper(msnContact, params[4]) + if len(params) > 4 and params[4] != "0": + self.handleAvatarHelper(msnContact, params[4]) self.contactStatusChanged(params[0], params[1], unquote(params[2])) def handle_FLN(self, params): From [EMAIL PROTECTED] Tue Aug 15 15:31:05 2006 From: [EMAIL PROTECTED] (Norman Rasmussen) Date: Tue Aug 15 15:31:09 2006 Subject: [py-transports] PyMSNt twisted.web.sux.ParseError In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> On 8/15/06, Vladimir Vrzic <[EMAIL PROTECTED]> wrote: > Since yesterday, PyMSN 0.10.3 shows strange behaviour. The contacts keep > appearing offline, then back online. Since about yesterday, I've seen two MSN contacts (both the only ones running on the same transport), doing a Ping Pong, here are the server stats: Uptime 3566400 MessageCount 1566 FailedMessageCount 6 FailedAvatarCount 792 TotalUsers 143 OnlineUsers 1 AvatarCount 22 and here's what the status looks like: 2:14:25 User A online 2:14:25 User B offline 2:14:58 User A offline 2:14:57 User B online 2:15:28 User A online 2:15:29 User B offline 2:15:45 User A offline 2:15:45 User B online 2:15:56 User A online 2:15:57 User B offline 2:16:09 User A online 2:16:10 User B offline etc, etc, etc, -- - Norman Rasmussen - Email: [EMAIL PROTECTED] - Home page: http://norman.rasmussen.co.za/ From [EMAIL PROTECTED] Tue Aug 15 18:58:57 2006 From: [EMAIL PROTECTED] (=?utf-8?Q?Derek_Kuli=C5=84ski?=) Date: Tue Aug 15 18:59:09 2006 Subject: [py-transports] getAttribute exception in pyMSN (trigerred by contacts using non-standard MSN client) Message-ID: <[EMAIL PROTECTED]> Hello, I read archive of the mailing list, and I saw many people had similar problems to me. I also know that in pyMSN 0.11.2 this error will be fixed. I just want to have confirmation, that the error I'm experiencing is the same as other users, and is not another one: [2006-08-14 18:33:46] >> NLN NLN [EMAIL PROTECTED] Dariusz 805306404 0 [2006-08-14 18:33:46] Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/twisted/internet/pollreactor.py", line 145, in doPoll log.callWithLogger(selectable, _drdw, selectable, fd, event, POLLIN, POLLOUT, log) File "/usr/local/lib/python2.4/site-packages/twisted/python/log.py", line 65, in callWithLogger callWithContext({"system": lp}, func, *args, **kw) File "/usr/local/lib/python2.4/site-packages/twisted/python/log.py", line 52, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "/usr/local/lib/python2.4/site-packages/twisted/python/context.py", line 43, in callWithContext return func(*args,**kw) --- <exception caught here> --- File "/usr/local/lib/python2.4/site-packages/twisted/internet/pollreactor.py", line 160, in _doReadOrWrite why = selectable.doRead() File "/usr/local/lib/python2.4/site-packages/twisted/internet/tcp.py", line 255, in doRead return self.protocol.dataReceived(data) File "/usr/local/lib/python2.4/site-packages/twisted/protocols/basic.py", line 223, in dataReceived why = self.lineReceived(line) File "/usr/local/lib/jabber/pymsn/src/tlib/msn/msn.py", line 826, in lineReceived try: handler(params.split(' ')) File "/usr/local/lib/jabber/pymsn/src/tlib/msn/msn.py", line 1182, in handle_NLN self.handleAvatarHelper(msnContact, params[4]) File "/usr/local/lib/jabber/pymsn/src/tlib/msn/msn.py", line 1158, in handleAvatarHelper msnobj = MSNObject(unquote(msnobjStr)) File "/usr/local/lib/jabber/pymsn/src/tlib/msn/msn.py", line 492, in __init__ self.parse(s) File "/usr/local/lib/jabber/pymsn/src/tlib/msn/msn.py", line 535, in parse self.creator = e.getAttribute("Creator") exceptions.AttributeError: 'NoneType' object has no attribute 'getAttribute' [2006-08-14 18:33:46] <twisted.internet.tcp.Connector instance at 0x85b5fec> will retry in 2 seconds [2006-08-14 18:33:46] Stopping factory <tlib.msn.msn.NotificationFactory instance at 0x85b576c> [2006-08-14 18:33:46] INFO :: [EMAIL PROTECTED] :: :: wait :: msn.msnw.NotificationClient :: {'self': 'instance', 'reason': <twisted.python.failure.Failure exceptions.AttributeError>}
