[Mailman-Users] sendigest error

Mark Sapiro msapiro at value.net
Tue Oct 31 20:58:46 CET 2006

Kory Wheatley wrote:
>I receive the following error when the below cron job is ran, or just 
>running it from the command line.  Any suggestion on what would fix this 
>issue?  Do I have a bad digest.mbox somewhere?

Probably not. You have a digest.mbox that has a message with an unusual
rfc2231 encoded header (a long filename= parameter in the
Content-Disposition: header of an attachment with an apostrophe in the
name), but the header is probably correct. It is the Python
email.Utils.decode_params() function that has the problem. This has
been fixed in Python email 2.5.8 which ships with Mailman 2.1.9

> /usr/local/bin/python -S /home/mailman/cron/senddigests
>Traceback (most recent call last):
>  File "/home/mailman/cron/senddigests", line 94, in ?
>    main()
>  File "/home/mailman/cron/senddigests", line 86, in main
>    mlist.send_digest_now()
>  File "/home/mailman/Mailman/Digester.py", line 60, in send_digest_now
>    ToDigest.send_digests(self, mboxfp)
>  File "/home/mailman/Mailman/Handlers/ToDigest.py", line 133, in 
>    send_i18n_digests(mlist, mboxfp)
>  File "/home/mailman/Mailman/Handlers/ToDigest.py", line 315, in 
>    msg = scrubber(mlist, msg)
>  File "/home/mailman/Mailman/Handlers/Scrubber.py", line 299, in process
>    url = save_attachment(mlist, part, dir)
>  File "/home/mailman/Mailman/Handlers/Scrubber.py", line 411, in 
>    filename = Utils.oneline(msg.get_filename(''), lcset)
>  File "/home/mailman/pythonlib/email/Message.py", line 724, in get_filename
>    filename = self.get_param('filename', missing, 'content-disposition')
>  File "/home/mailman/pythonlib/email/Message.py", line 607, in get_param
>    for k, v in self._get_params_preserve(failobj, header):
>  File "/home/mailman/pythonlib/email/Message.py", line 554, in 
>    params = Utils.decode_params(params)
>  File "/home/mailman/pythonlib/email/Utils.py", line 337, in decode_params
>    charset, language, value = decode_rfc2231(EMPTYSTRING.join(value))
>  File "/home/mailman/pythonlib/email/Utils.py", line 284, in decode_rfc2231
>    charset, language, s = parts
>ValueError: unpack list of wrong size

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