[Mailman-Users] and a message to root from output cron job
Richard Barrett
r.barrett at ftel.co.uk
Thu Oct 30 16:05:41 CET 2003
Javier
On Thursday, October 30, 2003, at 11:48 am, javier wrote:
>
>> From Super-User <root>
> To root
> Date Thu, 30 Oct 2003 12:36:06 +0100 (MET)
> Subject Output from "cron" command
>
> Your "cron" job on burlador
> /usr/local/bin/python -S /usr/local/mailman/cron/senddigests
>
> produced the following output:
>
> Traceback (most recent call last):
> File "/usr/local/mailman/cron/senddigests", line 94, in ?
> main()
> File "/usr/local/mailman/cron/senddigests", line 86, in main
> mlist.send_digest_now()
> File "/usr/local/mailman/Mailman/Digester.py", line 60, in
> send_digest_now
> ToDigest.send_digests(self, mboxfp)
> File "/usr/local/mailman/Mailman/Handlers/ToDigest.py", line 131, in
> send_digests
> send_i18n_digests(mlist, mboxfp)
> File "/usr/local/mailman/Mailman/Handlers/ToDigest.py", line 304, in
> send_i18n_digests
> msg = scrubber(mlist, msg)
> File "/usr/local/mailman/Mailman/Handlers/Scrubber.py", line 311, in
> process
> t = t.encode(charset, 'replace')
> File "/usr/local/lib/python2.2/encodings/__init__.py", line 51, in
> search_function
> mod = __import__(modname,globals(),locals(),'*')
> ValueError: Empty module name
>
From a quick look at the code, I think this may happen if a message has
an invalid Content-type: header of the form:
Content-type: text/foo; charset=
That is, it has a charset parameter but no actual value has been
assigned to it. But I could be wrong.
As a quick fix you could try changing line 280 of
$prefix/Mailman/Handlers/Scrubber.py from:
if charset is None or charset == 'us-ascii':
to:
if charset is None or charset == '' or charset == 'us-ascii':
If you try this hack let me know whether it works or not. I am not sure
if this is the best long term fix but if it appears to work I will look
at the problem a bit further.
Do not forget to backup the Scrubber.py before changing it in case you
have to revert to the original.
Regards
Richard
>
> --
> Javier Romero Casado
> tel.913357274
> Dep. Comunicaciones
> CEDEX
More information about the Mailman-Users
mailing list