[Mailman-Users] unexpected code byte in Header.py

Mark Sapiro msapiro at value.net
Tue Jan 10 21:27:43 CET 2006


imacat wrote:
>
>    I have problem upgrading my Mailman 2.1.5 to Mailman 2.1.7.  I got
>the following error in /var/lib/mailman/logs/error when I tried to send
>the "who" request:
>
>Jan 11 02:33:06 2006 (12256) Uncaught runner exception: 'utf8' codec
>can't decode byte 0xb4 in position 8: unexpected code byte
>Jan 11 02:33:06 2006 (12256) Traceback (most recent call last):
>  File "/opt/mailman/Mailman/Queue/Runner.py", line 111, in _oneloop
>    self._onefile(msg, msgdata)
>  File "/opt/mailman/Mailman/Queue/Runner.py", line 167, in _onefile
>    keepqueued = self._dispose(mlist, msg, msgdata)
>  File "/opt/mailman/Mailman/Queue/VirginRunner.py", line 38, in _dispose
>    return IncomingRunner._dispose(self, mlist, msg, msgdata)
>  File "/opt/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose
>    more = self._dopipeline(mlist, msg, msgdata, pipeline)
>  File "/opt/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline
>    sys.modules[modname].process(mlist, msg, msgdata)
>  File "/opt/mailman/Mailman/Handlers/CookHeaders.py", line 188, in process
>    i18ndesc = uheader(mlist, mlist.description, 'List-Id', maxlinelen=998)
>  File "/opt/mailman/Mailman/Handlers/CookHeaders.py", line 65, in uheader
>    return Header(s, charset, maxlinelen, header_name, continuation_ws)
>  File "/opt/mailman/pythonlib/email/Header.py", line 188, in __init__
>    self.append(s, charset, errors)
>  File "/opt/mailman/pythonlib/email/Header.py", line 272, in append
>    ustr = unicode(s, incodec, errors)
>UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in position 8: unexpected code byte
>
>    The mail I sent is:
>

The trace indicates this has nothing to do with the message you sent or
that it was a who request.

The error occurs in the attempt to add the RFC 2369 List-Id: header to
the response message. It seems the error will occur any time Mailman
sends anything for this list.

The problem is in processing the 'description' for the list. Some of
the logic involved changed between 2.1.5 and 2.1.6.

Check the list description on the General Options page for non-ascii
(an acute accent in position 8?), although it is not clear to me why
this would cause the error as the code seems to test for non-ascii and
use iso-8859-1 encoding if there is any non-ascii.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list