The second error has not happened again after a cvs update

On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> Well I fixed that one, and the logged back in and got this:
> 
> 06/01/05 - 12:03:39 - Traceback (most recent call last):
> 06/01/05 - 12:03:39 -   File
> "/usr/lib/python2.3/site-packages/twisted/internet/base.py", line 423,
> in runUntilCurrent
> 06/01/05 - 12:03:41 -     call.func(*call.args, **call.kw)
> 06/01/05 - 12:03:41 -   File
> "/usr/src/cvs/msn-transport/PyMSNt/src/disco.py", line 38, in
> checkDeferred
> 06/01/05 - 12:03:41 -     d.errback()
> 06/01/05 - 12:03:41 -   File
> "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> 274, in errback
> 06/01/05 - 12:03:42 -     self._startRunCallbacks(fail)
> 06/01/05 - 12:03:42 -   File
> "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> 313, in _startRunCallbacks
> 06/01/05 - 12:03:42 -     self._runCallbacks()
> 06/01/05 - 12:03:42 - --- <exception caught here> ---
> 06/01/05 - 12:03:42 -   File
> "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> 338, in _runCallbacks
> 06/01/05 - 12:03:42 -     self.result = callback(self.result, *args, **kw)
> 06/01/05 - 12:03:42 - exceptions.TypeError: errback() takes no
> arguments (1 given)
> 
> any ideas?
> 
> On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> > One of the users on my msn transport complained that their msn
> > preferred name was set to their jabber username and not the registered
> > value or the vcard value.  I checked the logs, and lo-and-behold found
> > a bug:
> >
> > 06/01/05 - 10:41:33 - Traceback (most recent call last):
> > 06/01/05 - 10:41:33 -   File
> > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 1027, in
> > handle_ADC
> > 06/01/05 - 10:41:33 -     if not self._fireCallback(id,
> > listCodeToID[listType], userGuid, userHandle, screenName):
> > 06/01/05 - 10:41:33 -   File
> > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 601, in
> > _fireCallback
> > 06/01/05 - 10:41:33 -     self.ids[id][0].callback(args)
> > 06/01/05 - 10:41:33 -   File
> > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > 252, in callback
> > 06/01/05 - 10:41:33 -     self._startRunCallbacks(result)
> > 06/01/05 - 10:41:33 -   File
> > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > 313, in _startRunCallbac
> > 06/01/05 - 10:41:33 -     self._runCallbacks()
> > 06/01/05 - 10:41:33 - --- <exception caught here> ---
> > 06/01/05 - 10:41:33 -   File
> > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > 338, in _runCallbacks
> > 06/01/05 - 10:41:33 -     self.result = callback(self.result, *args, **kw)
> > 06/01/05 - 10:41:33 -   File
> > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 1677, in _cb
> > 06/01/05 - 10:41:33 -     c = MSNContact(userGuid=r[1],
> > userHandle=r[2], screenName=[r3])
> > 06/01/05 - 10:41:33 - exceptions.NameError: global name 'r3' is not defined
> >
> > I expect [r3] needs to be r[3]?
> >
> > --
> > - Norman Rasmussen
> >  - Email: [EMAIL PROTECTED]
> >  - Home page: http://norman.rasmussen.org/
> >
> 
> --
> - Norman Rasmussen
>  - Email: [EMAIL PROTECTED]
>  - Home page: http://norman.rasmussen.org/
> 


-- 
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.org/
From [EMAIL PROTECTED]  Wed Jun  1 10:46:48 2005
From: [EMAIL PROTECTED] (Norman Rasmussen)
Date: Wed Jun  1 10:46:51 2005
Subject: [py-transports] Re: vcard update failed
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

now i find this:

Discovery: Iq received "[EMAIL PROTECTED]" "1". Looking for handler
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/twisted/xish/utility.py",
line 34, in __call__
    self.method(*nargs, **nkwargs)
  File "/usr/src/cvs/msn-transport/PyMSNt/src/disco.py", line 69, in onIq
    self.deferredIqs[(fro, ID)].callback(el)
  File "/usr/lib/python2.3/site-packages/twisted/internet/defer.py",
line 252, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.3/site-packages/twisted/internet/defer.py",
line 313, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.3/site-packages/twisted/internet/defer.py",
line 338, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
exceptions.TypeError: errback() takes no arguments (1 given)

are you finding the reporting of bugs useful or should i just wait for
stuff to get fixed in CVS?

On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> The second error has not happened again after a cvs update
> 
> On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> > Well I fixed that one, and the logged back in and got this:
> >
> > 06/01/05 - 12:03:39 - Traceback (most recent call last):
> > 06/01/05 - 12:03:39 -   File
> > "/usr/lib/python2.3/site-packages/twisted/internet/base.py", line 423,
> > in runUntilCurrent
> > 06/01/05 - 12:03:41 -     call.func(*call.args, **call.kw)
> > 06/01/05 - 12:03:41 -   File
> > "/usr/src/cvs/msn-transport/PyMSNt/src/disco.py", line 38, in
> > checkDeferred
> > 06/01/05 - 12:03:41 -     d.errback()
> > 06/01/05 - 12:03:41 -   File
> > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > 274, in errback
> > 06/01/05 - 12:03:42 -     self._startRunCallbacks(fail)
> > 06/01/05 - 12:03:42 -   File
> > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > 313, in _startRunCallbacks
> > 06/01/05 - 12:03:42 -     self._runCallbacks()
> > 06/01/05 - 12:03:42 - --- <exception caught here> ---
> > 06/01/05 - 12:03:42 -   File
> > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > 338, in _runCallbacks
> > 06/01/05 - 12:03:42 -     self.result = callback(self.result, *args, **kw)
> > 06/01/05 - 12:03:42 - exceptions.TypeError: errback() takes no
> > arguments (1 given)
> >
> > any ideas?
> >
> > On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> > > One of the users on my msn transport complained that their msn
> > > preferred name was set to their jabber username and not the registered
> > > value or the vcard value.  I checked the logs, and lo-and-behold found
> > > a bug:
> > >
> > > 06/01/05 - 10:41:33 - Traceback (most recent call last):
> > > 06/01/05 - 10:41:33 -   File
> > > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 1027, in
> > > handle_ADC
> > > 06/01/05 - 10:41:33 -     if not self._fireCallback(id,
> > > listCodeToID[listType], userGuid, userHandle, screenName):
> > > 06/01/05 - 10:41:33 -   File
> > > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 601, in
> > > _fireCallback
> > > 06/01/05 - 10:41:33 -     self.ids[id][0].callback(args)
> > > 06/01/05 - 10:41:33 -   File
> > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > 252, in callback
> > > 06/01/05 - 10:41:33 -     self._startRunCallbacks(result)
> > > 06/01/05 - 10:41:33 -   File
> > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > 313, in _startRunCallbac
> > > 06/01/05 - 10:41:33 -     self._runCallbacks()
> > > 06/01/05 - 10:41:33 - --- <exception caught here> ---
> > > 06/01/05 - 10:41:33 -   File
> > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > 338, in _runCallbacks
> > > 06/01/05 - 10:41:33 -     self.result = callback(self.result, *args, **kw)
> > > 06/01/05 - 10:41:33 -   File
> > > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 1677, in _cb
> > > 06/01/05 - 10:41:33 -     c = MSNContact(userGuid=r[1],
> > > userHandle=r[2], screenName=[r3])
> > > 06/01/05 - 10:41:33 - exceptions.NameError: global name 'r3' is not 
> > > defined
> > >
> > > I expect [r3] needs to be r[3]?
> > >
> > > --
> > > - Norman Rasmussen
> > >  - Email: [EMAIL PROTECTED]
> > >  - Home page: http://norman.rasmussen.org/
> > >
> >
> > --
> > - Norman Rasmussen
> >  - Email: [EMAIL PROTECTED]
> >  - Home page: http://norman.rasmussen.org/
> >
> 
> --
> - Norman Rasmussen
>  - Email: [EMAIL PROTECTED]
>  - Home page: http://norman.rasmussen.org/
> 


-- 
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.org/
From [EMAIL PROTECTED]  Wed Jun  1 10:51:06 2005
From: [EMAIL PROTECTED] 
(=?ISO-8859-1?Q?Francisco_Joaqu=EDn_Rodr=EDguez_Prados?=)
Date: Wed Jun  1 10:51:09 2005
Subject: [py-transports] server with pyMSNt CVS?
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

2005/6/1, James Bunton <[EMAIL PROTECTED]>:
> Yup :)
> This will be fixed for my next CVS checkin. Which will have support for
> viewing MSN avatars.
> 
Reading this a question came to my mind...

Does someone of any public server that uses pyMSNt CVS? Or there is
some kind of testing server which accepts testing users?

-- 
Francisco Joaqu?n Rodr?guez Prados
Fachbereich Informatik,
Fachhochschule Darmstadt,
Darmstadt, Germany
From [EMAIL PROTECTED]  Wed Jun  1 13:26:34 2005
From: [EMAIL PROTECTED] (Norman Rasmussen)
Date: Wed Jun  1 13:26:37 2005
Subject: [py-transports] server with pyMSNt CVS?
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

I'm running the avatar cvs branch, the server is publicly available,
but I perfer people to ask before the use it.

On 01/06/05, Francisco Joaqu?n Rodr?guez Prados <[EMAIL PROTECTED]> wrote:
> 2005/6/1, James Bunton <[EMAIL PROTECTED]>:
> > Yup :)
> > This will be fixed for my next CVS checkin. Which will have support for
> > viewing MSN avatars.
> >
> Reading this a question came to my mind...
> 
> Does someone of any public server that uses pyMSNt CVS? Or there is
> some kind of testing server which accepts testing users?
> 
> --
> Francisco Joaqu?n Rodr?guez Prados
> Fachbereich Informatik,
> Fachhochschule Darmstadt,
> Darmstadt, Germany
> _______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
> 


-- 
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.org/
From [EMAIL PROTECTED]  Thu Jun  2 11:18:29 2005
From: [EMAIL PROTECTED] (Norman Rasmussen)
Date: Thu Jun  2 11:19:57 2005
Subject: [py-transports] Re: vcard update failed
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

new bug :-)

NotificationClient: "[EMAIL PROTECTED]" lost connection with MSN servers
MSNConnection: "[EMAIL PROTECTED]" destroyed
MSNConnection: "[EMAIL PROTECTED]" initialised
LegacyConnection: "[EMAIL PROTECTED]" - loggedIn()
NotificationClient: "[EMAIL PROTECTED]" authenticated with MSN servers
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/twisted/internet/default.py",
line 526, in doSelect
    _logrun(selectable, _drdw, selectable, method, dict)
  File "/usr/lib/python2.3/site-packages/twisted/python/log.py", line
65, in callWithLogger
    callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.3/site-packages/twisted/python/log.py", line
52, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.3/site-packages/twisted/python/context.py",
line 43, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.3/site-packages/twisted/internet/default.py",
line 535, in _doReadOrWrite
    why = getattr(selectable, method)()
  File "/usr/lib/python2.3/site-packages/twisted/internet/tcp.py",
line 255, in doRead
    return self.protocol.dataReceived(data)
  File "/usr/lib/python2.3/site-packages/twisted/protocols/basic.py",
line 223, in dataReceived
    why = self.lineReceived(line)
  File "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 665,
in lineReceived
    try: handler(params.split())
  File "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 992,
in handle_BPR
    self._getStateData('last_contact').setPhone(params[0], unquote(params[1]))
  File "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 452,
in setPhone
    else: raise ValueError, "Invalid Phone Type"
exceptions.ValueError: Invalid Phone Type


On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> now i find this:
> 
> Discovery: Iq received "[EMAIL PROTECTED]" "1". Looking for handler
> Traceback (most recent call last):
>   File "/usr/lib/python2.3/site-packages/twisted/xish/utility.py",
> line 34, in __call__
>     self.method(*nargs, **nkwargs)
>   File "/usr/src/cvs/msn-transport/PyMSNt/src/disco.py", line 69, in onIq
>     self.deferredIqs[(fro, ID)].callback(el)
>   File "/usr/lib/python2.3/site-packages/twisted/internet/defer.py",
> line 252, in callback
>     self._startRunCallbacks(result)
>   File "/usr/lib/python2.3/site-packages/twisted/internet/defer.py",
> line 313, in _startRunCallbacks
>     self._runCallbacks()
> --- <exception caught here> ---
>   File "/usr/lib/python2.3/site-packages/twisted/internet/defer.py",
> line 338, in _runCallbacks
>     self.result = callback(self.result, *args, **kw)
> exceptions.TypeError: errback() takes no arguments (1 given)
> 
> are you finding the reporting of bugs useful or should i just wait for
> stuff to get fixed in CVS?
> 
> On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> > The second error has not happened again after a cvs update
> >
> > On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> > > Well I fixed that one, and the logged back in and got this:
> > >
> > > 06/01/05 - 12:03:39 - Traceback (most recent call last):
> > > 06/01/05 - 12:03:39 -   File
> > > "/usr/lib/python2.3/site-packages/twisted/internet/base.py", line 423,
> > > in runUntilCurrent
> > > 06/01/05 - 12:03:41 -     call.func(*call.args, **call.kw)
> > > 06/01/05 - 12:03:41 -   File
> > > "/usr/src/cvs/msn-transport/PyMSNt/src/disco.py", line 38, in
> > > checkDeferred
> > > 06/01/05 - 12:03:41 -     d.errback()
> > > 06/01/05 - 12:03:41 -   File
> > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > 274, in errback
> > > 06/01/05 - 12:03:42 -     self._startRunCallbacks(fail)
> > > 06/01/05 - 12:03:42 -   File
> > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > 313, in _startRunCallbacks
> > > 06/01/05 - 12:03:42 -     self._runCallbacks()
> > > 06/01/05 - 12:03:42 - --- <exception caught here> ---
> > > 06/01/05 - 12:03:42 -   File
> > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > 338, in _runCallbacks
> > > 06/01/05 - 12:03:42 -     self.result = callback(self.result, *args, **kw)
> > > 06/01/05 - 12:03:42 - exceptions.TypeError: errback() takes no
> > > arguments (1 given)
> > >
> > > any ideas?
> > >
> > > On 01/06/05, Norman Rasmussen <[EMAIL PROTECTED]> wrote:
> > > > One of the users on my msn transport complained that their msn
> > > > preferred name was set to their jabber username and not the registered
> > > > value or the vcard value.  I checked the logs, and lo-and-behold found
> > > > a bug:
> > > >
> > > > 06/01/05 - 10:41:33 - Traceback (most recent call last):
> > > > 06/01/05 - 10:41:33 -   File
> > > > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 1027, in
> > > > handle_ADC
> > > > 06/01/05 - 10:41:33 -     if not self._fireCallback(id,
> > > > listCodeToID[listType], userGuid, userHandle, screenName):
> > > > 06/01/05 - 10:41:33 -   File
> > > > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 601, in
> > > > _fireCallback
> > > > 06/01/05 - 10:41:33 -     self.ids[id][0].callback(args)
> > > > 06/01/05 - 10:41:33 -   File
> > > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > > 252, in callback
> > > > 06/01/05 - 10:41:33 -     self._startRunCallbacks(result)
> > > > 06/01/05 - 10:41:33 -   File
> > > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > > 313, in _startRunCallbac
> > > > 06/01/05 - 10:41:33 -     self._runCallbacks()
> > > > 06/01/05 - 10:41:33 - --- <exception caught here> ---
> > > > 06/01/05 - 10:41:33 -   File
> > > > "/usr/lib/python2.3/site-packages/twisted/internet/defer.py", line
> > > > 338, in _runCallbacks
> > > > 06/01/05 - 10:41:33 -     self.result = callback(self.result, *args, 
> > > > **kw)
> > > > 06/01/05 - 10:41:33 -   File
> > > > "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 1677, in _cb
> > > > 06/01/05 - 10:41:33 -     c = MSNContact(userGuid=r[1],
> > > > userHandle=r[2], screenName=[r3])
> > > > 06/01/05 - 10:41:33 - exceptions.NameError: global name 'r3' is not 
> > > > defined
> > > >
> > > > I expect [r3] needs to be r[3]?
> > > >
> > > > --
> > > > - Norman Rasmussen
> > > >  - Email: [EMAIL PROTECTED]
> > > >  - Home page: http://norman.rasmussen.org/
> > > >
> > >
> > > --
> > > - Norman Rasmussen
> > >  - Email: [EMAIL PROTECTED]
> > >  - Home page: http://norman.rasmussen.org/
> > >
> >
> > --
> > - Norman Rasmussen
> >  - Email: [EMAIL PROTECTED]
> >  - Home page: http://norman.rasmussen.org/
> >
> 
> --
> - Norman Rasmussen
>  - Email: [EMAIL PROTECTED]
>  - Home page: http://norman.rasmussen.org/
> 


-- 
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.org/
From [EMAIL PROTECTED]  Thu Jun  2 14:54:54 2005
From: [EMAIL PROTECTED] (Lars T. Mikkelsen)
Date: Thu Jun  2 14:55:03 2005
Subject: [py-transports] Re: vcard update failed
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

On Thu, Jun 02, 2005 at 01:18:29PM +0200, Norman Rasmussen wrote:
> new bug :-)
[snip]
>   File "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 452,
> in setPhone
>     else: raise ValueError, "Invalid Phone Type"
> exceptions.ValueError: Invalid Phone Type

I've got the same exception when the transport received 'BPR HSB 1',
According to [1] this message indicates that the contact has a blog on
MSN Spaces.

I'm attaching a patch against HEAD of the avatars branch to fix this
issue.

Best regards,
Lars

[1] http://msnpiki.msnfanatic.com/index.php/MSNP11:Changes#BPR
-------------- next part --------------
Index: msn.py
===================================================================
RCS file: /home/cvs/msn-transport/PyMSNt/src/tlib/msn.py,v
retrieving revision 1.12.2.7
diff -u -r1.12.2.7 msn.py
--- msn.py      2 Jun 2005 12:30:18 -0000       1.12.2.7
+++ msn.py      2 Jun 2005 14:45:35 -0000
@@ -139,6 +139,7 @@
 WORK_PHONE   = "PHW"
 MOBILE_PHONE = "PHM"
 HAS_PAGER    = "MOB"
+HAS_BLOG     = "HSB"
 
 # status constants
 STATUS_ONLINE  = 'NLN'
@@ -423,6 +424,7 @@
     @type mobilePhone: str if known, otherwise None.
     @ivar hasPager: Whether or not this user has a mobile pager
                     (true=yes, false=no)
+    @ivar hasBlog: Whether or not this user has a MSN Spaces blog
     """
     MSNC1 = 0x10000000
     MSNC2 = 0x20000000
@@ -445,6 +447,7 @@
         self.workPhone   = None
         self.mobilePhone = None
         self.hasPager    = None
+        self.hasBlog     = None
 
     def setPhone(self, phoneType, value):
         """
@@ -457,6 +460,7 @@
         elif t == WORK_PHONE: self.workPhone = value
         elif t == MOBILE_PHONE: self.mobilePhone = value
         elif t == HAS_PAGER: self.hasPager = value
+        elif t == HAS_BLOG: self.hasBlog = value
         else: raise ValueError, "Invalid Phone Type"
 
     def addToList(self, listType):
From [EMAIL PROTECTED]  Thu Jun  2 15:10:01 2005
From: [EMAIL PROTECTED] (Norman Rasmussen)
Date: Thu Jun  2 18:27:09 2005
Subject: [py-transports] Re: vcard update failed
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

I added the following extra debug information:

--- src/tlib/msn.py     23 May 2005 12:01:51 -0000      1.12.2.6
+++ src/tlib/msn.py     2 Jun 2005 15:05:38 -0000
@@ -449,7 +449,7 @@
         elif t == WORK_PHONE: self.workPhone = value
         elif t == MOBILE_PHONE: self.mobilePhone = value
         elif t == HAS_PAGER: self.hasPager = value
-        else: raise ValueError, "Invalid Phone Type"
+        else: raise ValueError, "Invalid Phone Type: " + t

     def addToList(self, listType):
         """

This way it's MUCH easier to see how to fix the error in the stack trace :-)

On 02/06/05, Lars T. Mikkelsen <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 02, 2005 at 01:18:29PM +0200, Norman Rasmussen wrote:
> > new bug :-)
> [snip]
> >   File "/usr/src/cvs/msn-transport/PyMSNt/src/tlib/msn.py", line 452,
> > in setPhone
> >     else: raise ValueError, "Invalid Phone Type"
> > exceptions.ValueError: Invalid Phone Type
> 
> I've got the same exception when the transport received 'BPR HSB 1',
> According to [1] this message indicates that the contact has a blog on
> MSN Spaces.
> 
> I'm attaching a patch against HEAD of the avatars branch to fix this
> issue.
> 
> Best regards,
> Lars
> 
> [1] http://msnpiki.msnfanatic.com/index.php/MSNP11:Changes#BPR
> 
> 
> _______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
> 
> 
> 
> 


-- 
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.co.za/
From [EMAIL PROTECTED]  Thu Jun  2 21:10:59 2005
From: [EMAIL PROTECTED] (Lars T. Mikkelsen)
Date: Thu Jun  2 21:11:04 2005
Subject: [py-transports] PyMSNt: minor fix to MSNEventBase.rawDataReceived()
Message-ID: <[EMAIL PROTECTED]>

Hi,

When testing HEAD of the avatars branch I sometimes get output like
this:

<< MSG <buddy>@hotmail.com <buddy> 146
<< MIME-Version: 1.0
<< Content-Type: application/x-msnmsgrp2p
<< P2P-Dest: <my address>
<< 
<< MSG <buddy>@hotmail.com <buddy> 1344
<< MIME-Version: 1.0
<< Content-Type: application/x-msnmsgrp2p
<< P2P-Dest: <my address>
<< 
Got a packet! BjkAADcZCgAAAAAAAAAAAHVFAAAAAAAAsgQAACAAAADC/BcBAAAAAAAAAAAAAAAA
processPacket with state: 4
Unpacked fields: 0x3906L 0xA1937L 0x0L 0x4575L 0x4B2L 0x20L 0x117FCC2L 0x0L 
0x0L 0x1L
In WAIT_DATAPREP
err3
out of processPacket
STATE: 4
Got a packet! BjkAADYZCgAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAADC/BcBAAAAAAAAAAAAAAAA
processPacket with state: 4
Unpacked fields: 0x3906L 0xA1936L 0x0L 0x4L 0x4L 0x0L 0x117FCC2L 0x0L 0x0L 0x1L
In WAIT_DATAPREP
out of processPacket

That is, MSNP2P_Avatar_Receive.processPacket() gets the packets out of
order (the first "Data Message" is parsed before the "Data Preperation
Message"), and hence, the retrieval of the avatar eventually fails.

I think this issue is due to the order setLineMode() and checkMessage()
are called inside MSNEventBase.rawDataReceived(). If 'data' contains the
next MSG, that MSG will be passed to setLineMode(), which will trigger a
new rawDataReceived() and eventually processPacket() - before
checkMessage() and processPacket() is called on the first message.

I'm attaching a patch to fix the issue - perhaps it can be fixed in a
more elegant way. I don't know if the patch will break other things.

Best regards,
Lars
-------------- next part --------------
Index: msn.py
===================================================================
RCS file: /home/cvs/msn-transport/PyMSNt/src/tlib/msn.py,v
retrieving revision 1.12.2.7
diff -u -r1.12.2.7 msn.py
--- msn.py      2 Jun 2005 12:30:18 -0000       1.12.2.7
+++ msn.py      2 Jun 2005 20:35:08 -0000
@@ -690,9 +690,10 @@
         del self.currentMessage.readPos
         m = self.currentMessage
         self.currentMessage = None
-        self.setLineMode(extra)
         if not self.checkMessage(m):
+            self.setLineMode(extra)
             return
+        self.setLineMode(extra)
         self.gotMessageBase(m)
 
     ### protocol command handlers - no need to override these.
From [EMAIL PROTECTED]  Thu Jun  2 21:54:07 2005
From: [EMAIL PROTECTED] 
(=?ISO-8859-1?Q?Francisco_Joaqu=EDn_Rodr=EDguez_Prados?=)
Date: Thu Jun  2 21:54:12 2005
Subject: [py-transports] Re: vcard update failed
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

Huh, sounds like someone found out why I was not able to login :D

2005/6/2, Norman Rasmussen <[EMAIL PROTECTED]>:
> new bug :-)
> 
> NotificationClient: "[EMAIL PROTECTED]" lost connection with MSN servers
> MSNConnection: "[EMAIL PROTECTED]" destroyed
> MSNConnection: "[EMAIL PROTECTED]" initialised
> LegacyConnection: "[EMAIL PROTECTED]" - loggedIn()
> NotificationClient: "[EMAIL PROTECTED]" authenticated with MSN servers
> Traceback (most recent call last):

-- 
Francisco Joaqu?n Rodr?guez Prados
Fachbereich Informatik,
Fachhochschule Darmstadt,
Darmstadt, Germany
From [EMAIL PROTECTED]  Fri Jun  3 04:00:13 2005
From: [EMAIL PROTECTED] (Peter Berry)
Date: Fri Jun  3 04:00:32 2005
Subject: [py-transports] PyMSNt crash bugs
Message-ID: <[EMAIL PROTECTED]>

Just noticed my MSN connection reset, so I had a gander at the logs and 
found these 2 tracebacks (the second happening several times, the first 
once).

Traceback (most recent call last):
   File "/usr/lib/python2.3/site-packages/twisted/internet/default.py", 
line 526, in doSelect
     _logrun(selectable, _drdw, selectable, method, dict)
   File "/usr/lib/python2.3/site-packages/twisted/python/log.py", line 65, 
in callWithLogger
     callWithContext({"system": lp}, func, *args, **kw)
   File "/usr/lib/python2.3/site-packages/twisted/python/log.py", line 52, 
in callWithContext
     return context.call({ILogContext: newCtx}, func, *args, **kw)
   File "/usr/lib/python2.3/site-packages/twisted/python/context.py", line 
43, in callWithContext
     return func(*args,**kw)
--- <exception caught here> ---
   File "/usr/lib/python2.3/site-packages/twisted/internet/default.py", 
line 535, in _doReadOrWrite
     why = getattr(selectable, method)()
   File "/usr/lib/python2.3/site-packages/twisted/internet/tcp.py", line 
255, in doRead
     return self.protocol.dataReceived(data)
   File "/usr/lib/python2.3/site-packages/twisted/protocols/basic.py", line 
223, in dataReceived
     why = self.lineReceived(line)
   File "/usr/lib/jabber/msn/src/tlib/msn.py", line 652, in lineReceived
     try: handler(params.split())
   File "/usr/lib/jabber/msn/src/tlib/msn.py", line 999, in handle_ADD
     self.userAddedMe(userHandle, unquote(params[4]), listVer)
   File "/usr/lib/jabber/msn/src/legacy/msnw.py", line 592, in userAddedMe
     self.factory.msncon.userAddedMe(userHandle)
   File "/usr/lib/jabber/msn/src/legacy/glue.py", line 372, in userAddedMe
     self.subscriptions.msnContactAddedMe(userHandle)
   File "/usr/lib/jabber/msn/src/legacy/subscription.py", line 125, in 
msnContactAddedMe
     for item in document.elements():
exceptions.AttributeError: 'NoneType' object has no attribute 'elements'

Traceback (most recent call last):
   File "/usr/lib/python2.3/site-packages/twisted/internet/default.py", 
line 526, in doSelect
     _logrun(selectable, _drdw, selectable, method, dict)
   File "/usr/lib/python2.3/site-packages/twisted/python/log.py", line 65, 
in callWithLogger
     callWithContext({"system": lp}, func, *args, **kw)
   File "/usr/lib/python2.3/site-packages/twisted/python/log.py", line 52, 
in callWithContext
     return context.call({ILogContext: newCtx}, func, *args, **kw)
   File "/usr/lib/python2.3/site-packages/twisted/python/context.py", line 
43, in callWithContext
     return func(*args,**kw)
--- <exception caught here> ---
   File "/usr/lib/python2.3/site-packages/twisted/internet/default.py", 
line 535, in _doReadOrWrite
     why = getattr(selectable, method)()
   File "/usr/lib/python2.3/site-packages/twisted/internet/tcp.py", line 
255, in doRead
     return self.protocol.dataReceived(data)
   File "/usr/lib/jabber/msn/src/tlib/xmlstream.py", line 159, in 
dataReceived
     self.stream.parse(buf)
   File "/usr/lib/jabber/msn/src/tlib/domish.py", line 598, in parse
     self.parser.Parse(buffer)
   File "/usr/lib/jabber/msn/src/tlib/domish.py", line 635, in 
_onEndElement
     self.ElementEvent(self.currElem)
   File "/usr/lib/jabber/msn/src/tlib/xmlstream.py", line 180, in onElement
     self.dispatch(element)
   File "/usr/lib/python2.3/site-packages/twisted/xish/utility.py", line 
139, in dispatch
     callbacklist.callback(object)
   File "/usr/lib/python2.3/site-packages/twisted/xish/utility.py", line 
50, in callback
     methodwrapper(*args, **kwargs)
   File "/usr/lib/python2.3/site-packages/twisted/xish/utility.py", line 
34, in __call__
     self.method(*nargs, **nkwargs)
   File "/usr/lib/jabber/msn/src/disco.py", line 91, in onIq
     handler(el)
   File "/usr/lib/jabber/msn/src/register.py", line 69, in 
incomingRegisterIq
     self.sendRegistrationFields(incoming)
   File "/usr/lib/jabber/msn/src/register.py", line 100, in 
sendRegistrationFields
     self.pytrans.send(reply)
   File "/usr/lib/jabber/msn/src/tlib/jabber/component.py", line 96, in 
send
     self.parent.send(obj)
   File "/usr/lib/jabber/msn/src/tlib/jabber/component.py", line 162, in 
send
     self.xmlstream.send(obj)
   File "/usr/lib/jabber/msn/src/tlib/xmlstream.py", line 193, in send
     obj = obj.toXml()
   File "/usr/lib/jabber/msn/src/tlib/domish.py", line 399, in toXml
     s.serialize(self, closeElement)
   File "/usr/lib/jabber/msn/src/tlib/domish.py", line 92, in serialize
     write((" %s='%s'" % ( k, escapeToXml(v, 1))).encode("utf-8"))
   File "/usr/lib/jabber/msn/src/tlib/domish.py", line 202, in escapeToXml
     text = text.replace("&", "&amp;")
exceptions.AttributeError: 'NoneType' object has no attribute 'replace'


-- 
Peter Berry, SUCS Ex-Treasurer
<[EMAIL PROTECTED]>
From [EMAIL PROTECTED]  Fri Jun  3 08:13:52 2005
From: [EMAIL PROTECTED] (James Bunton)
Date: Fri Jun  3 08:14:21 2005
Subject: [py-transports] PyMSNt: minor fix to
        MSNEventBase.rawDataReceived()
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

Thanks :)

I was trying to figure that one out.

---

James



On 03/06/2005, at 7:10 AM, Lars T. Mikkelsen wrote:

> Hi,
>
> When testing HEAD of the avatars branch I sometimes get output like
> this:
>
> << MSG <buddy>@hotmail.com <buddy> 146
> << MIME-Version: 1.0
> << Content-Type: application/x-msnmsgrp2p
> << P2P-Dest: <my address>
> <<
> << MSG <buddy>@hotmail.com <buddy> 1344
> << MIME-Version: 1.0
> << Content-Type: application/x-msnmsgrp2p
> << P2P-Dest: <my address>
> <<
> Got a packet! 
> BjkAADcZCgAAAAAAAAAAAHVFAAAAAAAAsgQAACAAAADC/BcBAAAAAAAAAAAAAAAA
> processPacket with state: 4
> Unpacked fields: 0x3906L 0xA1937L 0x0L 0x4575L 0x4B2L 0x20L 0x117FCC2L 
> 0x0L 0x0L 0x1L
> In WAIT_DATAPREP
> err3
> out of processPacket
> STATE: 4
> Got a packet! 
> BjkAADYZCgAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAADC/BcBAAAAAAAAAAAAAAAA
> processPacket with state: 4
> Unpacked fields: 0x3906L 0xA1936L 0x0L 0x4L 0x4L 0x0L 0x117FCC2L 0x0L 
> 0x0L 0x1L
> In WAIT_DATAPREP
> out of processPacket
>
> That is, MSNP2P_Avatar_Receive.processPacket() gets the packets out of
> order (the first "Data Message" is parsed before the "Data Preperation
> Message"), and hence, the retrieval of the avatar eventually fails.
>
> I think this issue is due to the order setLineMode() and checkMessage()
> are called inside MSNEventBase.rawDataReceived(). If 'data' contains 
> the
> next MSG, that MSG will be passed to setLineMode(), which will trigger 
> a
> new rawDataReceived() and eventually processPacket() - before
> checkMessage() and processPacket() is called on the first message.
>
> I'm attaching a patch to fix the issue - perhaps it can be fixed in a
> more elegant way. I don't know if the patch will break other things.
>
> Best regards,
> Lars
> <rawDataReceived.patch>_______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports

Reply via email to