[Mailman-Users] problems with withlist and changepw.py

Keith Nunn knunn at national.anglican.ca
Wed Apr 16 21:46:31 CEST 2003


I'm using the changepw.py example from the withliost man page:

from Mailman.Errors import NotAMember

def changepw(mlist, addr, newpasswd):
    try:
        mlist.setMemberPassword(addr, newpasswd)
        mlist.Save()
    except NotAMember:
        print 'No address matched:', addr

partly as an exercise and partly so I can figure out a good way to
integrate Mailman with my canoeing club software.  However, after
following (I think) the instructions about using withlist and the above
bit of code:

bin/withlist -l -r changepw vvcc kapn at kapn.net passwd
(executed in the mailman directory)

I get the following error:

Importing changepw...
Traceback (most recent call last):
  File "./bin/withlist", line 275, in ?
    main()
  File "./bin/withlist", line 247, in main
    mod = __import__(module)
  File "./bin/changepw.py", line 1, in ?
    from Mailman.Errors import NotAMember
ImportError: cannot import name NotAMember

It looks like the sort of error easily solved by someone with a clue
about Python, but not having much of a clue I'm a bit lost.  Why is the
NotAMember method (or object, or whatever it is) not being loaded?  What
do I need to do to get it coming in?  Any help would be appreciated

kapn
-- 
Keith Nunn, Webmanager, Anglican Church of Canada
knunn at national.anglican.ca * 416-924-9199 x340
www.anglican.ca * www.anglicanjournal.com




More information about the Mailman-Users mailing list