Hi

Dne Wed, 26 May 2010 18:30:40 +0100
ian <i...@comtek.co.uk> napsal(a):

> AIM messages couldn't be sent (though receiving worked). We were seeing 
> errors like:
> [2010-05-26 16:18:46] Traceback (most recent call last):
>           File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 
> 84, in callWithLogger
>             return callWithContext({"system": lp}, func, *args, **kw)
>           File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 
> 69, in callWithContext
>             return context.call({ILogContext: newCtx}, func, *args, **kw)
>           File "/usr/lib/python2.5/site-packages/twisted/python/context.py", 
> line 59, in callWithContext
>             return self.currentContext().callWithContext(ctx, func, *args, 
> **kw)
>           File "/usr/lib/python2.5/site-packages/twisted/python/context.py", 
> line 37, in callWithContext
>             return func(*args,**kw)
>         --- <exception caught here> ---
>           File 
> "/usr/lib/python2.5/site-packages/twisted/internet/epollreactor.py", line 
> 210, in _doReadOrWrite
>             why = selectable.doRead()
>           File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", 
> line 460, in doRead
>             return self.protocol.dataReceived(data)
>           File 
> "/usr/lib/python2.5/site-packages/twisted/words/xish/xmlstream.py", line 75, 
> in dataReceived
>             self.stream.parse(data)
>           File 
> "/usr/lib/python2.5/site-packages/twisted/words/xish/domish.py", line 759, in 
> parse
>             self.parser.Parse(buffer)
>           File 
> "/usr/lib/python2.5/site-packages/twisted/words/xish/domish.py", line 780, in 
> _onStartElement
>             e = Element(qname, self.defaultNsStack[-1], attrs, 
> self.localPrefixes)
>           File 
> "/usr/lib/python2.5/site-packages/twisted/words/xish/domish.py", line 404, in 
> __init__
>             self.uri, self.name = qname
>         exceptions.ValueError: too many values to unpack
> 
> I managed to 'fix' the problem, by changing line 762 of domish.py:
>    qname = name.split(" ")
> to:
>    qname = name.replace('  ', ' ').split(" ")
> 
> Because we were seeing values of name like [note the double space]:
>    http://www.xmpp.org/extensions/xep-0084.html#ns-data  data
> 
> which caused qname to contain more than 2 elements, later breaking the tuple 
> unpacking.
> 
> At this point I should warn: While this change fixed pyaimt for us I have no 
> understanding of the protocol and its entirely possible that my fix is 
> totally inappropriate.

I have no idea whether the fix is appropriate or not, however your
change is in python-twisted-words, so I'm reassigning it to this
package.

-- 
        Michal Čihař | http://cihar.com | http://blog.cihar.com

Attachment: signature.asc
Description: PGP signature

Reply via email to