Bug#443069: mailman: senddigests cron job: TypeError: iso-8859-1

2007-09-18 Thread Julian Mehnle
Package: mailman
Version: 1:2.1.9-8
Severity: important
Followup-For: Bug #384016

It seems that #384016 is not resolved yet.  I recently upgraded mailman
from 1:2.1.8-4 to 1:2.1.9-8, and now I am getting the following error
message whenever the senddigests cron job runs (i.e. daily):

| Traceback (most recent call last):
|   File /usr/lib/mailman/cron/senddigests, line 94, in ?
| main()
|   File /usr/lib/mailman/cron/senddigests, line 86, in main
| mlist.send_digest_now()
|   File /usr/lib/mailman/Mailman/Digester.py, line 60, in send_digest_now
| ToDigest.send_digests(self, mboxfp)
|   File /usr/lib/mailman/Mailman/Handlers/ToDigest.py, line 142, in 
send_digests
| send_i18n_digests(mlist, mboxfp)
|   File /usr/lib/mailman/Mailman/Handlers/ToDigest.py, line 324, in 
send_i18n_digests
| msg = scrubber(mlist, msg)
|   File /usr/lib/mailman/Mailman/Handlers/Scrubber.py, line 393, in process
| replace_payload_by_text(msg, sep.join(text), charset)
|   File /usr/lib/mailman/Mailman/Handlers/Scrubber.py, line 175, in 
replace_payload_by_text
| msg.set_payload(text, charset)
|   File email/Message.py, line 218, in set_payload
|   File email/Message.py, line 242, in set_charset
| TypeError: iso-8859-1

I followed the trail of #384016 and found that its supposed fix (the
mailman package shipping its own email Python package) does not seem
to be in effect on my system:

| io:/usr/lib/mailman/cron python
| Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
| [GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
| Type help, copyright, credits or license for more information.
|  import paths
|  import email
|  email.__version__
| '3.0.2'
| 

Using python2.3 to run senddigests works around the problem as expected:

| io:/usr/lib/mailman/cron sudo -H -u list python2.3 
/usr/lib/mailman/cron/senddigests
| io:/usr/lib/mailman/cron

What's going on here?  Has the inclusion of mailman's own email
package been reverted?

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (600, 'testing'), (90, 'unstable')
Architecture: i386 (i586)

Kernel: Linux 2.6.21-2-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mailman depends on:
ii  adduser   3.105  add and remove users and groups
ii  apache2   2.0.55-4.1 next generation, scalable, extenda
ii  apache2-mpm-worker [httpd]2.0.55-4.1 high speed threaded model for Apac
ii  courier-mta [mail-transport-a 0.53.3-6   Courier Mail Server - ESMTP daemon
ii  cron  3.0pl1-100 management of regular background p
ii  debconf [debconf-2.0] 1.5.14 Debian configuration management sy
ii  libc6 2.6.1-1+b1 GNU C Library: Shared libraries
ii  logrotate 3.7.1-3Log rotation utility
ii  lsb-base  3.1-24 Linux Standard Base 3.1 init scrip
ii  pwgen 2.06-1 Automatic Password generation
ii  python2.4.4-6An interactive high-level object-o
ii  python-support0.6.4  automated rebuilding support for p
ii  ucf   3.001  Update Configuration File: preserv

mailman recommends no packages.

-- debconf information:
  mailman/update_passwords:
* mailman/site_languages: de, en
* mailman/used_languages: de en
* mailman/create_site_list:
* mailman/queue_files_present:
* mailman/default_server_language: en
* mailman/gate_news: false
  mailman/update_aliases:



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#443069: mailman: senddigests cron job: TypeError: iso-8859-1

2007-09-18 Thread Joost van Baal
On Tue, Sep 18, 2007 at 01:47:12PM +, Julian Mehnle wrote:
 Package: mailman
 Version: 1:2.1.9-8
 Severity: important
 Followup-For: Bug #384016
 
 It seems that #384016 is not resolved yet.  I recently upgraded mailman
 from 1:2.1.8-4 to 1:2.1.9-8, and now I am getting the following error
 message whenever the senddigests cron job runs (i.e. daily):
 
 | Traceback (most recent call last):
 |   File /usr/lib/mailman/cron/senddigests, line 94, in ?
 | main()
 |   File /usr/lib/mailman/cron/senddigests, line 86, in main
 | mlist.send_digest_now()
 |   File /usr/lib/mailman/Mailman/Digester.py, line 60, in send_digest_now
 | ToDigest.send_digests(self, mboxfp)
 |   File /usr/lib/mailman/Mailman/Handlers/ToDigest.py, line 142, in 
 send_digests
 | send_i18n_digests(mlist, mboxfp)
 |   File /usr/lib/mailman/Mailman/Handlers/ToDigest.py, line 324, in 
 send_i18n_digests
 | msg = scrubber(mlist, msg)
 |   File /usr/lib/mailman/Mailman/Handlers/Scrubber.py, line 393, in process
 | replace_payload_by_text(msg, sep.join(text), charset)
 |   File /usr/lib/mailman/Mailman/Handlers/Scrubber.py, line 175, in 
 replace_payload_by_text
 | msg.set_payload(text, charset)
 |   File email/Message.py, line 218, in set_payload
 |   File email/Message.py, line 242, in set_charset
 | TypeError: iso-8859-1
 
 I followed the trail of #384016 and found that its supposed fix (the
 mailman package shipping its own email Python package) does not seem
 to be in effect on my system:
 
 | io:/usr/lib/mailman/cron python
 | Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
 | [GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
 | Type help, copyright, credits or license for more information.
 |  import paths
 |  import email
 |  email.__version__
 | '3.0.2'
 | 
 
 Using python2.3 to run senddigests works around the problem as expected:
 
 | io:/usr/lib/mailman/cron sudo -H -u list python2.3 
 /usr/lib/mailman/cron/senddigests
 | io:/usr/lib/mailman/cron
 
 What's going on here?  Has the inclusion of mailman's own email
 package been reverted?

FWIW, I've recently manually done:

 ln -s /usr/lib/mailman/pythonlib /var/lib/mailman/pythonlib

after such a Mailman upgrade.  It solved the shown errors from
senddigests.

Apparently, the postinst script fails to execute this under some
circumstances.  Since my system is nonstandard (/var/lib/mailman is a
symlink here), I didn't investigate further.  Anyway, the workaround
might work for you too.

Bye,

Joost



signature.asc
Description: Digital signature


Bug#443069: mailman: senddigests cron job: TypeError: iso-8859-1

2007-09-18 Thread Julian Mehnle
Joost van Baal wrote:
 FWIW, I've recently manually done:

  ln -s /usr/lib/mailman/pythonlib /var/lib/mailman/pythonlib

 after such a Mailman upgrade.  It solved the shown errors from
 senddigests.

 Apparently, the postinst script fails to execute this under some
 circumstances.

Not only that, but on my system /var/lib/mailman/pythonlib is a (empty) 
directory owned by the package mailman!  Kind of difficult to place a 
symlink there when there's already a real directory of the same name.

However if I remove the empty dir and replace it with a symlink as you 
said, then it works:

| io:/usr/lib/mailman/cron python
| Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
| [GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
| Type help, copyright, credits or license for more information.
|  import paths
|  import email
|  email.__version__
| '2.5.8'
| 

Thanks.  So I guess this issue boils down to the mailman package needing to 
install a symlink rather than a directory as /var/lib/mailman/pythonlib.


pgpOxxhIvq0wi.pgp
Description: PGP signature