[Mailman-Users] Automatic subscribtions

Mark Sapiro msapiro at value.net
Fri Oct 12 06:37:12 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frédéric Mantegazza wrote:
> On vendredi 05 octobre 2007, Mark Sapiro wrote:
> 
>> However, it is probably simpler to creat som SQL query which will write
>> a membership list to a flat file and then use Mailman's bin/sync_members
>> to update the Mailman list membership.
> 
> 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.

- --
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFHDvn4VVuXXpU7hpMRAhzqAJ9pzcirMqo9A5gEzJc2NHMmzwpuDACg0a0O
1mj4dm99LvV1+CEHAhFjTrw=
=xT+V
-----END PGP SIGNATURE-----


More information about the Mailman-Users mailing list