[Mailman-Users] (no subject)

Allan Hansen hansen at rc.org
Mon Oct 15 10:12:21 CEST 2007


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.
hansen at rc.org
+1-714-875-8870


More information about the Mailman-Users mailing list