Exception info: Already Exists on New Add

Ron Teitelbaum Ron at USMedRec.com
Tue Dec 18 04:57:43 CET 2007

Hello All,

I've been searching for an answer to this question but have come up blank.

I'm adding an organization 

I get an exception info:'', desc: 'Already Exists' but if I go to gq the
record actually did get added.

I'm using 
	{'objectclass':('organization',), 'o': 'test2'} input to modlist
which results in
	[('objectclass',('organization',)), ('o', 'test2')']

With a dn
	'o=test2, dc=example, dc=com'

I'm calling 'add_s'

I have an exception handler that retrys the add on Can't contact server

First I check gq for the record and it does not exist.  I execute the add_s
code, get the Already Exists error then go back and check gq and the record
and it is there.

I've been getting errors: Can't contact LDAP server.  But it appears that if
I retry bind, or search, (and now add) after hitting this error it succeeds,
which is why I added a retry handler.  Looking at the trace this could be my
problem.  It might be that it succeeds in the add but raises the Can't
contact server error anyway.  

I'm running on Ubuntu 7.04 (VMWare).  Python2.4. Python-ldap 2.2.1

I've attached the trace file.  Any idea why I would get this result?  If the
record was inserted then why am I getting this Can't contact error, and if
it didn't insert the record because it couldn't contact the server then why
am I getting the Already Exists error?

Any ideas about what may be causing either one of these errors are welcome!

Thank you for your help!

Ron Teitelbaum
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PyLdapTrace.txt
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20071217/28556cd4/attachment.txt>

More information about the python-ldap mailing list