Install problem [python-ldap-2.0.0pre04]
Michael Ströder
michael at stroeder.com
Sun Feb 10 18:35:42 CET 2002
Donal Hunt wrote:
>
> >>> l = ldap.initialize("earth.dcu.ie:389")
In opposite to ldap.open() the function ldap.initialize() expects a
LDAP URL as stated in ldap.initialize.__doc__ and the updated docs
(see http://python-ldap.sourceforge.net/doc/python-ldap/node4.html).
Therefore your funtion call has to be:
>>> l = ldap.initialize("ldap://earth.dcu.ie:389")
> ldap.LDAPError: (2, 'No such file or directory')
> >>>
This error message is misleading I admit. It comes from the OpenLDAP
2 libs. Hmm, ldap.initialize() could check for LDAP URL format to
provide a better error message by raising a specific ValueError
exception.
Ciao, Michael.
More information about the python-ldap
mailing list