[Mailman-Users] Uncaught runner exception: unknown encoding: gb2312

Mark Sapiro msapiro at value.net
Thu Jun 22 19:22:12 CEST 2006


Reinhard Proessler wrote:
>
>Some users reports that emails from a Chinese customer 
>do not reach the recipients from a list. The mails reach
>our system, where stored in the archive folder, but not
>forwarded to the list member.
>
>I took a look to the mailman error log and found (only) this entry:
>
<snip>
>  File "/var/mailman/Mailman/Handlers/CookHeaders.py", line 262, in
>prefix_subject
>    h.append(s, c)
>  File
>"/usr/src/build/717258-i386/install/var/mailman/pythonlib/email/Header.py",
>line 285, in append
>LookupError: unknown encoding: gb2312
>
>Jun 21 16:15:46 2006 (29723) SHUNTING:
>1150899346.6632681+54941ca3c4ce38e3aedfa9e82e393150283d78ff
>------------
>
>It seems to be that the reason is an unknown encoding: gb2312
>
>I searched in the Internet and mailing-lists and found only a hint to
>install
>Chinesecodecs. But after applying these ChineseCodecs-1.1.0p to 
>python site-packages with python installer the problem still exists.
>
>Any suggestions, experiences or hints with this problem?


Try the following in interactive python:

>>> x = unicode('abcde', 'gb2312')
>>> y = x.encode('gb2312')

If either of these throws an exception, the codecs are not properly
installed.

If the codecs are installed OK, it is probably necessary to add

import chinesecn

somewhere near the end of the various Mailman paths.py files (following
the line 'sys.path.append(sitedir)'.

These paths.py files are found in bin/, cron/, scripts/ and tests/
which in your case would seem to be in
/usr/src/build/717258-i386/install/var/mailman/

Then you need to restart Mailman (bin/mailmanctl restart) and then you
can try bin/unshunt to reprocess the shunted messages, but first y
should check qfiles/shunt/ to see if there might be old files there
that you don't want to reprocess (you can examine them with
bin/show_qfiles or bin/dumpdb). Any unwanted files can just be deleted.

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