[Mailman-Users] UnicodeDecodeError: 'ascii' codec can't decode byte

Steve Burling srb at umich.edu
Wed Mar 21 16:29:57 CET 2007

--On March 21, 2007 7:07:04 AM -0700 Mark Sapiro <msapiro at value.net> wrote:

> However, that response was to a specific occurrence of this exception
> in Decorate.py. If you are seeing this exception with a different
> traceback, changing the language character set won't eliminate the
> exception.
> A more common cause of the exception is non-encoded, non-ascii
> characters in the message Subject:, and that won't be fixed by this
> change. Note that such messages are almost always spam.

To which I reply:

Ok, I made the change, ran bin/unshunt, and the four messages in the shunt 
queue were re-shunted, so that's not it.  Here's a characteristic traceback:

Mar 21 10:35:47 2007 (6861) Uncaught runner exception: 'ascii' codec can't 
decode byte 0xc0 in position 0: ordinal not in range(128)
Mar 21 10:35:47 2007 (6861) Traceback (most recent call last):
  File "/opt/mailman/Mailman/Queue/Runner.py", line 112, in _oneloop
    self._onefile(msg, msgdata)
  File "/opt/mailman/Mailman/Queue/Runner.py", line 170, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/opt/mailman/Mailman/Queue/ArchRunner.py", line 73, in _dispose
    mlist.ArchiveMail(msg)  File 
"/opt/mailman/Mailman/Archiver/Archiver.py", line 216, in ArchiveMail
  File "/opt/mailman/Mailman/Archiver/pipermail.py", line 580, in 
    self.add_article(a)  File "/opt/mailman/Mailman/Archiver/pipermail.py", 
line 632, in add_article
    article.parentID = parentID = self.get_parent_info(arch, article)
  File "/opt/mailman/Mailman/Archiver/pipermail.py", line 664, in 
  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 311, in 
  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 251, in 
    t = DumbBTree(os.path.join(arcdir, archive + '-' + i))  File 
"/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 65, in __init__
  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 179, in load
  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 73, in __sort 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 0: 
ordinal not in range(128)
Mar 21 10:35:47 2007 (6861) SHUNTING: 

>From this, I'm guessing that something is wrong with a message in the 
list's .mbox file, which is confusing things.  Is that a reasonable guess? 
If so, is there a reasonable way to figure out *what* message is causing 
the problem (it's a *big* mailbox)?

Steve Burling                                    <mailto:srb at umich.edu>
University of Michigan, ICPSR                    Voice: +1 734 615.3779
330 Packard Street                               FAX:   +1 734 647.8700
Ann Arbor, MI 48104-2910

More information about the Mailman-Users mailing list