Hello people,

I get the same exception (PyMSN 0.11), but in a different file:

-----------------EXCEPTION-------------------
> 006-07-11 09:49:27] << ADC 9 FL [EMAIL PROTECTED] [EMAIL PROTECTED]
>[2006-07-11 09:49:27] Traceback (most recent call last):
>         File "c:\Python24\lib\site-packages\twisted\python\log.py", line
53, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
>         File "c:\Python24\lib\site-packages\twisted\python\log.py", line
38, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
>         File "c:\Python24\lib\site-packages\twisted\python\context.py",
line 59, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
>         File "c:\Python24\lib\site-packages\twisted\python\context.py",
line 37, in callWithContext
            return func(*args,**kw)
        --- <exception caught here> ---
>         File 
> "c:\Python24\lib\site-packages\twisted\internet\selectreactor.py",
line 139, in _doReadOrWrite
            why = getattr(selectable, method)()
>         File "c:\Python24\lib\site-packages\twisted\internet\tcp.py", line
348, in doRead
            return self.protocol.dataReceived(data)
>         File "c:\Python24\lib\site-packages\twisted\words\xish\xmlstream.py",
line 72, in dataReceived
            self.stream.parse(data)
>         File "c:\Python24\lib\site-packages\twisted\words\xish\domish.py",
line 730, in parse
            self.parser.Parse(buffer)
>         File "c:\Python24\lib\site-packages\twisted\words\xish\domish.py",
line 771, in _onEndElement
            self.ElementEvent(self.currElem)
>         File "c:\Python24\lib\site-packages\twisted\words\xish\xmlstream.py",
line 104, in onElement
            self.dispatch(element)
>         File "c:\Python24\lib\site-packages\twisted\words\xish\utility.py",
line 233, in dispatch
            callbacklist.callback(object)
>         File "c:\Python24\lib\site-packages\twisted\words\xish\utility.py",
line 37, in callback
            methodwrapper(*args, **kwargs)
>         File "c:\Python24\lib\site-packages\twisted\words\xish\utility.py",
line 21, in __call__
            self.method(*nargs, **nkwargs)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\main.py", line 284,
in onPresence
            s.onPresence(el)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\jabw.py", line 256,
in onPresence
            self.subscriptionReceived(fro, toj.userhost(), ptype)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\session.py", line
346, in subscriptionReceived
            self.contactList.jabberSubscriptionReceived(to, subtype)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\contact.py", line
243, in jabberSubscriptionReceived
            self.getContact(jid).jabberSubscriptionReceived(subtype)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\contact.py", line
137, in jabberSubscriptionReceived
            self.contactList.legacyList.addContact(self.jid)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\legacy\glue.py",
line 584, in addContact
            msnContact = 
self.session.legacycon.getContacts().getContact(userHandle)
        exceptions.AttributeError: 'NoneType' object has no attribute 
'getContact'
------------------------------------


Regards,

David



Quoting:
===========

Hi.

I had one user saying that our MSN transport was down today, even though
it was still up and 200+ users were connected and sending messages.

In the logs, the only error I could find was this:

> 02/02/06 - 10:05:11 - Traceback (most recent call last):
> 02/02/06 - 10:05:11 -   File 
> "/home/jabber/components/pymsnt/src/tlib/msn.py", line 1155, in handle_ADC
> 02/02/06 - 10:05:11 -     if not self._fireCallback(id, 
> listCodeToID[listType], userGuid, userHandle, screenName):
> 02/02/06 - 10:05:11 -   File 
> "/home/jabber/components/pymsnt/src/tlib/msn.py", line 611, in _fireCallback
> 02/02/06 - 10:05:11 -     self.ids[id][0].callback(args)
> 02/02/06 - 10:05:11 -   File 
> "/usr/local/lib/python2.4/site-packages/twisted/internet/defer.py",
line 254, in callback
> 02/02/06 - 10:05:11 -     self._startRunCallbacks(result)
> 02/02/06 - 10:05:11 -   File 
> "/usr/local/lib/python2.4/site-packages/twisted/internet/defer.py",
line 315, in _startRunCallbacks
> 02/02/06 - 10:05:11 -     self._runCallbacks()
> 02/02/06 - 10:05:11 - --- <exception caught here> ---
> 02/02/06 - 10:05:11 -   File 
> "/usr/local/lib/python2.4/site-packages/twisted/internet/defer.py",
line 328, in _runCallbacks
> 02/02/06 - 10:05:11 -     self.result = callback(self.result, *args, **kw)
> 02/02/06 - 10:05:11 -   File 
> "/home/jabber/components/pymsnt/src/tlib/msn.py", line 1712, in _cb
> 02/02/06 - 10:05:11 -     c = self.factory.contacts.getContact(r[2])
> 02/02/06 - 10:05:11 - exceptions.AttributeError: 'NoneType' object has no 
> attribute 'getContact'

I've reactively patched this on our server at line 1711 of msn.py so
that if factory.contacts doesn't exist it doesn't call getContact, but
this probably doesn't fix the underlying cause for it not existing in
the first place.

It looks like we're using PyMSNt 0.10, but I've looked at 0.10.3 and the
line of code I patched looks the same in the later version anyway.

Was an error like this fixed since 0.10?

TX
==========
From [EMAIL PROTECTED]  Tue Jul 11 09:17:28 2006
From: [EMAIL PROTECTED] (David E Freitas)
Date: Tue Jul 11 09:17:33 2006
Subject: [py-transports] 'NoneType' object has no attribute 'sendMessage' -
        "offline" message
Message-ID: <[EMAIL PROTECTED]>

Hi,

This TB (Traceback) occured.  PyMSN 0.11;

The recipient had logged off already.
And seems to have received a message while he has no .session available.


======================
> [2006-07-11 10:44:35] INFO :: [EMAIL PROTECTED]::  :: gotMessage :: 
> glue.LegacyConnection :: {'text': u'Ha ha long long long long text tetx 
> text', 'self': 'instance', 'remoteUser': '[EMAIL PROTECTED]'}
> [2006-07-11 10:44:35] Traceback (most recent call last):
>         File "c:\Python24\lib\site-packages\twisted\python\log.py", line
53, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
>         File "c:\Python24\lib\site-packages\twisted\python\log.py", line
38, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
>         File "c:\Python24\lib\site-packages\twisted\python\context.py",
line 59, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
>         File "c:\Python24\lib\site-packages\twisted\python\context.py",
line 37, in callWithContext
            return func(*args,**kw)
        --- <exception caught here> ---
>         File 
> "c:\Python24\lib\site-packages\twisted\internet\selectreactor.py",
line 139, in _doReadOrWrite
            why = getattr(selectable, method)()
>         File "c:\Python24\lib\site-packages\twisted\internet\tcp.py", line
348, in doRead
            return self.protocol.dataReceived(data)
>         File "c:\Python24\lib\site-packages\twisted\protocols\basic.py",
line 240, in dataReceived
            return self.rawDataReceived(data)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\tlib\msn\msn.py",
line 857, in rawDataReceived
            self.gotMessage(m)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\tlib\msn\msnw.py",
line 744, in gotMessage
            self.msncon.gotMessage(self.remoteUser, text)
>         File "C:\Documents and Settings\freitasd\My
Documents\pyMSN\PyMSNt-trunk 0.11 3Jul06\trunk\src\legacy\glue.py",
line 447, in gotMessage
            self.session.sendMessage(self.jabberID, fro=source, body=text,
mtype="chat")
        exceptions.AttributeError: 'NoneType' object has no attribute 
'sendMessage'

======================  


Cool,


David
From [EMAIL PROTECTED]  Tue Jul 11 09:50:56 2006
From: [EMAIL PROTECTED] (Trejkaz)
Date: Tue Jul 11 09:47:31 2006
Subject: [py-transports] Pymsn-t loosing messages with ejabberd 0.1.0
Message-ID: <[EMAIL PROTECTED]>

Reply via email to