[Mailman-Users] ImportError: No module named ldap

Mike Rosile mike.rosile at interzonegames.com
Thu Jul 26 00:08:14 CEST 2007

I'm trying to write to implement LDAPMemberships v3 using Mailman
v2.1.9, but I keep getting an error in the Mailman error log that says
"ImportError: No module named ldap".

For the record, I can import 'ldap' (aka python-ldap) from a regular
python script (from the command line).

I know Mailman uses a cgi wrapper for python, could this be part of the

Any help would greatly be appreciated!

Below is some relevant output from /var/log/mailman/error, if you need
additional info, please let me know.

Jul 25 15:46:53 2007 admin(12280):
admin(12280): [----- Mailman Version: 2.1.9 -----]
admin(12280): [----- Traceback ------]
admin(12280): Traceback (most recent call last):
admin(12280):   File "/var/lib/mailman/scripts/driver", line 110, in
admin(12280):     main()
admin(12280):   File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 66,
in main
admin(12280):     admin_overview()
admin(12280):   File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 233,
in admin_overview
admin(12280):     mlist = MailList.MailList(name, lock=0)
admin(12280):   File "/var/lib/mailman/Mailman/MailList.py", line 115,
in __init__
admin(12280):     execfile(filename, dict)
admin(12280):   File "/var/lib/mailman/lists/sgftest/extend.py", line 1,
in ?
admin(12280):     from Mailman.LDAPMemberships import LDAPMemberships
admin(12280):   File "/var/lib/mailman/Mailman/LDAPMemberships.py", line
85, in ?
admin(12280):     import ldap
admin(12280): ImportError: No module named ldap
admin(12280): [----- Python Information -----]
admin(12280): sys.version     =   2.4.4c1 (#2, Oct 11 2006, 20:00:03)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)]
admin(12280): sys.executable  =   /usr/bin/python
admin(12280): sys.prefix      =   /usr
admin(12280): sys.exec_prefix =   /usr
admin(12280): sys.path        =   /usr
admin(12280): sys.platform    =   linux2
admin(12280): [----- Environment Variables -----]
admin(12280):   AUTH_TYPE: Basic
admin(12280):   force_response_1_0: 1
admin(12280):   HTTP_COOKIE: userwdth=null; userfontsz=null; userbg=null
admin(12280):   SERVER_SOFTWARE: Apache/2.0.55 (Ubuntu) DAV/2 SVN/1.4.4
mod_python/3.3.1 Python/2.4.4c1 PHP/5.1.6 mod_ssl/2.0.55 OpenSSL/0.9.8b
mod_perl/2.0.2 Perl/v5.8.8
admin(12280):   SCRIPT_NAME: /mailman/admin
admin(12280):   SERVER_SIGNATURE:
admin(12280):   REQUEST_METHOD: GET
admin(12280):   SERVER_PROTOCOL: HTTP/1.1
admin(12280):   QUERY_STRING:
admin(12280):   HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR
2.0.50727; .NET CLR 3.0.04506.30; InfoPath.2)

More information about the Mailman-Users mailing list