From: <ai...@gm...> - 2007-03-09 15:45:50
|
Hello, here is an Ubuntu Server box (6.06) with python 2.4, python-ldap 2.0.4, and slapd 2.2.26 - all of these from Ubuntu package. Here is an application, what runs by crontab in every minutes. It looks a list, and if list was modified, it modifies LDAP tree. (List generated by a directory's items.) Early version of that app use to add an entry OBJECT.add() method, but it was not sync mode, and crontabs 1 minute was not enough to sync tree. So I changed to add_s(), and then my application adds entry sync correctly. But now, when original list modified, and app runs by crontab, I get this error: Traceback (most recent call last): File "/usr/local/checkftpdir/chkdir.py", line 43, in ? L.addEntry(d, base, '') 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 163, in add_s self.result(msgid,all=1,timeout=self.timeout) File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 399, in result res_type,res_data,res_msgid = self.result2(msgid,all,timeout) File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 405, in result2 return self._ldap_call(self._l.result2,msgid,all,timeout) 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'} and entry added correctly to tree. BUT, when I run it interactive, I _don't_get_any_ error. del_s() method doesn't give any error, just add_s(). Any suggestion? Thank you: a. |