[Mailman-Users] Encoding Error in Mailman

Mark Sapiro mark at msapiro.net
Tue Jul 20 16:44:51 CEST 2010


Brian Carpenter wrote:
>
>Yesterday I had a UK client have two messages from two different posters
>shunted for the following reason:
>
>Jul 19 05:24:03 2010 (28056) Uncaught runner exception: windows-1252
>Jul 19 05:24:03 2010 (28056) Traceback (most recent call last):
>  File "/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/Runner.py", line
>120, in _oneloop
>    self._onefile(msg, msgdata)
>  File "/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/Runner.py", line
>191, in _onefile
>    keepqueued = self._dispose(mlist, msg, msgdata)
>  File "/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/OutgoingRunner.py",
>line 74, in _dispose
>    self._func(mlist, msg, msgdata)
>  File "/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/SMTPDirect.py",
>line 132, in process
>    Decorate.process(mlist, msg, msgdata)
>  File "/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/Decorate.py",
>line 133, in process
>    msg.set_payload(payload, newcset)
>  File "/usr/local/lib/python2.4/email/Message.py", line 218, in set_payload
>    self.set_charset(charset)
>  File "/usr/local/lib/python2.4/email/Message.py", line 242, in set_charset
>    raise TypeError(charset)
>TypeError: windows-1252
[...]
>
>Looking at the error log, the above type of error message is VERY rare
>however it is strange that I had two of these show up within a close time of
>each other. The question that I have is does the above error message
>indicate a problem going on with the mailman server or was there an issue
>going on with the posters' email formatting?


There is a bug in certain versions of the Python email package. This
TypeError occurs because in the call to set_charset, the argument in
this case is a unicode u'windows-1252' instead of a string
'windows-1252'.

See the bug report at <https://bugs.launchpad.net/mailman/+bug/328353>,
particularly the patch at comment #11 which I think will fix this.

-- 
Mark Sapiro <mark at msapiro.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