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

Mark Sapiro msapiro at value.net
Thu Mar 22 06:41:25 CET 2007


Steve Burling wrote:
>
>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
>    h.processUnixMailbox(f)
>  File "/opt/mailman/Mailman/Archiver/pipermail.py", line 580, in 
>processUnixMailbox
>    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 
>get_parent_info
>    article.subject)
>  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 311, in 
>getOldestArticle
>    self.__openIndices(archive)
>  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 251, in 
>__openIndices
>    t = DumbBTree(os.path.join(arcdir, archive + '-' + i))  File 
>"/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 65, in __init__
>    self.load()
>  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 179, in load
>    self.__sort(dirty=1)
>  File "/opt/mailman/Mailman/Archiver/HyperDatabase.py", line 73, in __sort 
>self.sorted.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: 
>1174487402.1760509+9438ae178cf24ca45b73094e18778ba97c71df17
>
>>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? 


There may or may not be a problem with the list's .mbox file, but
that's not what h.processUnixMailbox(f) is doing in the above
traceback. It's only processing one message.


>If so, is there a reasonable way to figure out *what* message is causing 
>the problem (it's a *big* mailbox)?


The problem is likely caused by some issue with one of the current
database files in archives/private/listname/database/.

There are a couple of threads on this problem that can be found by the
google search
<http://www.google.com/search?hl=en&q=site%3Amail.python.org++inurl%3Amailman-users++%22%27ascii%27+codec+can%27t+decode+byte%22+HyperDatabase.py>
(or <http://tinyurl.com/2vwpoz> if you prefer).

The solution in both those cases was rebuilding the archive with
"bin/arch --wipe", but if your archives are old, I suggest first
running "bin/cleanarch --dry-run" on the mbox file and then running
cleanarch again if a problem is found.

-- 
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