[Mailman-Users] [Fwd: TypeError: us-ascii with python2.4 andmailman 2.1.8-1 (debian)]

Mark Sapiro msapiro at value.net
Wed Apr 11 02:20:38 CEST 2007

Justin Warren wrote:
>I hit the same sort of problem as a couple of other people apparently
>have, eg:
>I hit this when Mailman attempts to send digests.
>I thought I'd tracked the issue to the way Charset is used within
>Mailman/Scrubber.py, on line 193 (some modifications by me to print
>debug output):
>    charset = None                                                                                                     
>    lcset = Utils.GetCharSet(mlist.preferred_language)                                                                 
>    print "getting charset for preferred language:", repr(lcset)                                                       
>    lcset_out = Charset(lcset).output_charset or lcset                                                                 
>    print "lcset_out is:", repr(lcset_out) 
>Which yields:
>getting charset for preferred language: 'us-ascii'
>lcset_out is: u'us-ascii'
>It appears that Charset returns a unicode string for
>its .output_charset, which python2.4 email.Message.set_charset() does
>not recognise as a string, and it isn't a Charset either, so a TypeError
>is raised.

The real underlying question is are you using the email 2.5.7 package
that is distributed with Mailman 2.1.8 and normally installed in
Mailman's pythonlib, or is your Debian Mailman package broken in some

Do you have a pythonlib directory in your Mailman installation? Does it
have an email subdirectory? What is the version in

Does Mailman's bin/paths.py contain

  sys.path.insert(0, os.path.join(prefix, 'pythonlib'))

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