Package: pymsnt
Version: 0.11.2-3
Severity: important
Hi,
I'm experiencing some problems with pymsnt and the utf-8 decoder:
[2007-08-03 18:15:00] INFO :: [EMAIL PROTECTED] :: :: contactPersonalChanged
:: msn.msnw.NotificationClient :: {'personal': 'In qualche caso, la distinzione
tra un ammasso globulare ed uno galattico pu\xf2 non risultare del tutto
immediata:', 'self': 'instance', 'userHandle': '[EMAIL PROTECTED]'}
[2007-08-03 18:15:00] INFO :: [EMAIL PROTECTED] :: :: contactStatusChanged ::
glue.LegacyConnection :: {'remoteUser': '[EMAIL PROTECTED]', 'self': 'instance'}
[2007-08-03 18:15:00] 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 164,
in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line
348, in doRead
return self.protocol.dataReceived(data)
File "/usr/lib/python2.4/site-packages/twisted/protocols/basic.py",
line 240, in dataReceived
return self.rawDataReceived(data)
File "/usr/share/pymsnt/src/legacy/msn/msn.py", line 842, in
rawDataReceived
if not self.checkMessage(m):
File "/usr/share/pymsnt/src/legacy/msn/msn.py", line 1081, in
checkMessage
self._gotUBX(message)
File "/usr/share/pymsnt/src/legacy/msn/msn.py", line 1060, in _gotUBX
self.contactPersonalChanged(message.userHandle, personal)
File "/usr/share/pymsnt/src/legacy/msn/msnw.py", line 447, in
contactPersonalChanged
self.factory.msncon.contactStatusChanged(userHandle)
File "/usr/share/pymsnt/src/legacy/glue.py", line 486, in
contactStatusChanged
status = msnContact.personal.decode("utf-8")
File "encodings/utf_8.py", line 16, in decode
exceptions.UnicodeDecodeError: 'utf8' codec can't decode bytes in
position 76-79: invalid data
[2007-08-03 18:15:00] <twisted.internet.tcp.Connector instance at 0x40b6856c>
will retry in 2 seconds
[2007-08-03 18:15:00] Stopping factory <legacy.msn.msn.NotificationFactory
instance at 0x40b688ac>
this is probably because glue.py is not using the "errors" argument to
string.decode() (see http://docs.python.org/lib/string-methods.html) which was
introduced in 2.3.
I am not sure about the proper fix here, msnContact.personal.decode("utf-8",
"ignore") does the trick, although "replace" looks saner. (I'm currently using
"replace")
thanks,
filippo
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (700, 'stable'), (650, 'testing'), (500, 'proposed-updates')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20.3-bytemark-uml-2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages pymsnt depends on:
ii adduser 3.102 Add and remove users and groups
ii python 2.4.4-2 An interactive high-level object-o
ii python-central 0.5.12 register and build utility for Pyt
ii python-crypto 2.0.1+dfsg1-1.2 cryptographic algorithms and proto
ii python-pyopenssl 0.6-2.3 Python wrapper around the OpenSSL
ii python-twisted 2.4.0-3 Event-based framework for internet
Versions of packages pymsnt recommends:
ii python-imaging 1.1.5-11 Python Imaging Library
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]