Posted by xfyre at 2006-03-17 10:58:22
Sometimes transport goes to 'disconnected' state while ICQ contacts still stay
online. Attemps to reconnect result in following messages in log:
[2006-03-17 13:55:35] INFO :: ilya.obshadko@gmail.com :: Session ::
handleResourcePresence :: {'status': None, 'resource': u'Psi', 'show': None,
'url': None, 'ptype': None, 'existing': True, 'priority': u'5', 'to':
u'icq.matrix.xfyre.com', 'tor': None, 'source': u'ilya.obshadko@gmail.com',
'highestActive': u'Psi'} :: Updating status on legacy service
[2006-03-17 13:55:35] Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 53, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 38, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File
"/usr/lib/python2.4/site-packages/twisted/python/context.py", line 59,
in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File
"/usr/lib/python2.4/site-packages/twisted/python/context.py", line 37,
in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File
"/usr/lib/python2.4/site-packages/twisted/internet/pollreactor.py",
line 160, in _doReadOrWrite
why = selectable.doRead()
File
"/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 349,
in doRead
return self.protocol.dataReceived(data)
File
"/usr/lib/python2.4/site-packages/twisted/words/xish/xmlstream.py",
line 72, in dataReceived
self.stream.parse(buf)
File
"/usr/lib/python2.4/site-packages/twisted/words/xish/domish.py", line
524, in parse
self.parser.Parse(buffer)
File
"/usr/lib/python2.4/site-packages/twisted/words/xish/domish.py", line
564, in _onEndElement
self.ElementEvent(self.currElem)
File
"/usr/lib/python2.4/site-packages/twisted/words/xish/xmlstream.py",
line 104, in onElement
self.dispatch(element)
File
"/usr/lib/python2.4/site-packages/twisted/words/xish/utility.py", line
233, in dispatch
callbacklist.callback(object)
File
"/usr/lib/python2.4/site-packages/twisted/words/xish/utility.py", line
37, in callback
methodwrapper(*args, **kwargs)
File
"/usr/lib/python2.4/site-packages/twisted/words/xish/utility.py", line
21, in __call__
self.method(*nargs, **nkwargs)
File "/usr/local/pyicq-t-svn/trunk/src/main.py", line 335, in
onPresence
self.sessions[froj.userhost()].onPresence(el)
File "/usr/local/pyicq-t-svn/trunk/src/jabw.py", line 388, in
onPresence
self.presenceReceived(froj.userhost(), froj.resource, toj.userhost(),
toj.resource, priority, ptype, show, status)
File "/usr/local/pyicq-t-svn/trunk/src/session.py", line 223,
in presenceReceived
self.handleResourcePresence(source, resource, to, tor, priority,
ptype, show, status, url)
File "/usr/local/pyicq-t-svn/trunk/src/session.py", line 250,
in handleResourcePresence
self.setStatus(r.show, r.status, r.url)
File "/usr/local/pyicq-t-svn/trunk/src/session.py", line 174,
in setStatus
self.legacycon.setStatus(self.nickname, show, status, url)
exceptions.AttributeError: 'NoneType' object has no attribute 'setStatus'
[2006-03-17 13:55:35] INFO :: :: PyTransport :: componentDisconnected :: {} ::
[2006-03-17 13:55:35] <twisted.internet.tcp.Connector instance at
0xb72b4e8c> will retry in 2 seconds
[2006-03-17 13:55:35] Stopping factory
<twisted.words.protocols.jabber.xmlstream.XmlStreamFactory instance at
0xb7b2f10c>
Posted by jadestorm at 2006-03-18 00:10:44
Hrm sounds like a "race condition" of sorts.
Posted by xfyre at 2006-03-18 08:38:00
If Python has some synchonization mechanisms like Java, it maybe could help to
resolve the issue? Actually I have large ICQ contact list (over 300 contacts),
so you're probably right about the cause of error.
Posted by jadestorm at 2006-03-18 14:06:31
I don't think this particular issue is "your fault" (in other words,
happening because of your large contact list). I think I have misplaced a
check
in my code. It sounds like PyICQ is trying to do something before your session
has become active. (which is what i meant by the race condition) =( =(
Owner: ---