Uncaught runner exception: unknown encoding: gb2312

Hello
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:
Jun 21 16:15:46 2006 (29723) Uncaught runner exception: unknown encoding: gb2312 Jun 21 16:15:46 2006 (29723) Traceback (most recent call last): File "/var/mailman/Mailman/Queue/Runner.py", line 111, in _oneloop self._onefile(msg, msgdata) File "/var/mailman/Mailman/Queue/Runner.py", line 167, in _onefile keepqueued = self._dispose(mlist, msg, msgdata) File "/var/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose more = self._dopipeline(mlist, msg, msgdata, pipeline) File "/var/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline sys.modules[modname].process(mlist, msg, msgdata) File "/var/mailman/Mailman/Handlers/CookHeaders.py", line 74, in process prefix_subject(mlist, msg, msgdata) 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?
Kind Regards
RPr

On 6/22/06, Reinhard Proessler <reinhard.proessler@de.hanjin.com> wrote:
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.
Did you restart mailman's queue runners after doing this?
--
- Patrick Bogen

Thanks for you answer.
Yes, I did. I restarted the whole mail system including mailman.
Regards RPr
-----Original Message----- From: Patrick Bogen [mailto:pdbogen@gmail.com] Sent: Thursday, June 22, 2006 4:29 PM To: Reinhard Proessler Cc: mailman-users@python.org Subject: Re: [Mailman-Users] Uncaught runner exception: unknown encoding: gb2312
On 6/22/06, Reinhard Proessler <reinhard.proessler@de.hanjin.com> wrote:
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.
Did you restart mailman's queue runners after doing this?
--
- Patrick Bogen

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@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thanks,
added the line to the path.py in running system.
this seems to be the solution in my case. First test was successful.
I'll patch sources asap.
Kind Regards
RPr
[...] 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)'. [...]
participants (3)
-
Mark Sapiro
-
Patrick Bogen
-
Reinhard Proessler