add_s: ldap.INVALID_DN_SYNTAX
Ervin Hegedüs
airween at gmail.com
Fri Mar 9 21:21:59 CET 2007
Hello,
> > File "/usr/local/checkftpdir/Ldapfunctions.py", line 61, in addEntry
> > self.l.add_s(_dn, ldif)
[...]
> > File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 94,
> > in _ldap_call result = func(*args,**kwargs)
> > ldap.INVALID_DN_SYNTAX: {'info': 'invalid DN', 'desc': 'Invalid DN syntax'}
>
> This is an error the server sends back. Probably you're generating a DN
> with invalid syntax. I'd recommend to set trace_level=2 with
> ldap.initialize() to see what the python-ldap API receives from your script.
I'm not sure about it - as I wrote when I run script from system shell (I mean:
interactively), then script doesn't drop any exception. I try to print
out the DN
value, what I give to the function as first argument, and it looks
like a normally
DN, eg.: cn=airtest,ou=ftp,o=company,dc=domain,dc=com.
There aren't any spaces, or other chars, what I miss then.
By the way: I try to set up those trace_level, may be it will be more
informative...
thanks:
a.
More information about the python-ldap
mailing list