[python-ldap] Error trying to test python-ldap install.

Michael Ströder michael at stroeder.com
Sat Aug 13 20:04:50 CEST 2011


Michael Ströder wrote:
>> l.search_s('base',ldap.SCOPE_SUBTREE,'filter')
>> [..]
>> ldap.LDAPError: (2, 'No such file or directory')
> 
> I'd set trace_level=2 to observe which argument values are really passed to
> python-ldap.

I've overlooked this. You probably want to write

l.search_s(base,ldap.SCOPE_SUBTREE,filter)

if base and filter are variable names.

Also note that filter() is a built-in Python function. So I rather would use
filterstr as variable name.

Ciao, Michael.


More information about the python-ldap mailing list