Hi Stian,

On Fri, Aug 11, 2006 at 10:45:05AM +0200, Stian B. Barmen wrote:
> I changed the transport setting in ejabberd and have not been able to
> recreate the error since. The new problem I get now is that when I log on to
> the MSN network I get the following message and then a disconnect:
> 
> Disconnected from MSN servers: [Failure instance: Traceback (failure with no
> frames): exceptions.TypeError: int() argument must be a string or a number
> ]

I think you receive the error message due to this traceback:

> [2006-08-11 10:39:50] Traceback (most recent call last):
[snip]
>           File "/usr/local/pymsnt/src/legacy/msn/msn.py", line 1170, in
> handle_NLN
>             self.handleAvatarHelper(msnContact, params[4])
>           File "/usr/local/pymsnt/src/legacy/msn/msn.py", line 1146, in
> handleAvatarHelper
>             msnobj = MSNObject(unquote(msnobjStr))
>           File "/usr/local/pymsnt/src/legacy/msn/msn.py", line 478, in
> __init__
>             self.parse(s)
>           File "/usr/local/pymsnt/src/legacy/msn/msn.py", line 524, in parse
>             self.size = int(e.getAttribute("Size"))
>         exceptions.TypeError: int() argument must be a string or a number

Please try applying the attached patch and see if it fixes the issue - I
haven't been able to verify it myself, as I only get few of these
tracebacks per day.

Best regards,
Lars
-------------- next part --------------
Index: src/legacy/msn/msn.py
===================================================================
--- src/legacy/msn/msn.py       (revision 223)
+++ src/legacy/msn/msn.py       (working copy)
@@ -1130,7 +1130,7 @@
         msnContact.status = params[1]
         msnContact.screenName = unquote(params[3])
         if len(params) > 4: msnContact.caps = int(params[4])
-        if len(params) > 5:
+        if len(params) > 5 and params[5] != "0":
             self.handleAvatarHelper(msnContact, params[5])
         else:
             self.handleAvatarGoneHelper(msnContact)
@@ -1166,7 +1166,7 @@
         msnContact.status = params[0]
         msnContact.screenName = unquote(params[2])
         if len(params) > 3: msnContact.caps = int(params[3])
-        if len(params) > 4:
+        if len(params) > 4 and params[4] != "0":
             self.handleAvatarHelper(msnContact, params[4])
         else:
             self.handleAvatarGoneHelper(msnContact)
From [EMAIL PROTECTED]  Fri Aug 11 12:34:16 2006
From: [EMAIL PROTECTED] (Oscar =?ISO-8859-1?Q?Hellstr=F6m?=)
Date: Fri Aug 11 12:34:30 2006
Subject: [py-transports] Loosing messages
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

On Fri, 2006-08-11 at 07:13 -0400, Lars T. Mikkelsen wrote:
> Hi Stian,
>
> Please try applying the attached patch and see if it fixes the issue - I
> haven't been able to verify it myself, as I only get few of these
> tracebacks per day.
> 

I'll try that as well.
I got a lot of them.

> Best regards,
> Lars
> _______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
-- 
?Oscar Hellstr?m, [EMAIL PROTECTED]
web: personal.oscarh.net
jid: [EMAIL PROTECTED]

Reply via email to