You may also want to change add_members as follows: from
mlist.setDeliveryStatus(member, ... to mlist.setDeliveryStatus(userdesc.address, ... in case you want to use that, too. (I had to make that change) Allan >On vendredi 12 octobre 2007, Mark Sapiro wrote: > >> Frédéric Mantegazza wrote: > >> > Using sync_members on a file containing names and addresses, I get : >> > >> > Traceback (most recent call last): >> > File "/usr/sbin/sync_members", line 286, in ? >> > main() >> > File "/usr/sbin/sync_members", line 259, in main >> > s = email.Utils.formataddr((name, addr)).encode(enc, 'replace') >> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position >> > 3: ordinal not in range(128) >> > >> > Is this script able to handle non-ascii chars? >> >> There is a problem with the script, however at the point of the above >> error, the user had already been added and it is only in formatting the >> name and address for printing in the 'Added :' message that the error >> occurs. >> >> I think you can simply change line 289 of sync_members to >> >> s = email.Utils.formataddr((name, addr)) >> >> to avoid this problem. Please try that and report. > >Yes, it works. There are 2 lines with this call; I also had to change the >first one to make it work. > >Thanks. > >-- > Frédéric > > http://www.gbiloba.org -- Allan Hansen P.O Box 2423 Cypress, CA 90630 U.S.A. [EMAIL PROTECTED] +1-714-875-8870 ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp