[Mailman-Users] sync_members error
friedrich28 at gmx.de
friedrich28 at gmx.de
Sun Feb 16 02:27:04 CET 2003
Hi there,
I'm setting up an interaction of Mailman 2.1 with a list from a MySQL database via
newlist and sync_members. But sync_members always aborts with the following error:
2.05a IT ~ % sudo /Users/mailman/bin/sync_members -g=yes -a=no -f
/Users/mailman/queries/mailresult listname
Traceback (most recent call last):
File "/Users/mailman/bin/sync_members", line 286, in ?
main()
File "/Users/mailman/bin/sync_members", line 258, in main
s = email.Utils.formataddr((name, addr)).encode(enc, 'replace')
UnboundLocalError: local variable 'enc' referenced before assignment
The code fragment in question is:
# addrs contains now all the addresses that need removing
for laddr, (name, addr) in needsadding.items():
pw = Utils.MakeRandomPassword()
# should not already be subscribed, otherwise our test above is
# broken. Bogosity is if the address is listed in the file more
# than once. Second and subsequent ones trigger an
# MMAlreadyAMember error. Just catch it and go on.
userdesc = UserDesc(addr, name, pw, digest)
try:
if not dryrun:
mlist.ApprovedAddMember(userdesc, welcome, notifyadmin)
s = email.Utils.formataddr((name, addr)).encode(enc, 'replace') ### line 258
print _('Added : %(s)s')
except Errors.MMAlreadyAMember:
pass
I've checked mailresult (which is a MySQL Output), it contains only valid eMail-
addresses, one per line.
Direct MySQL interaction is still not available, right?
Thanks for your help,
Friedrich
More information about the Mailman-Users
mailing list