From: Yeargan Y. <ya...@un...> - 2008-01-29 15:36:27
|
Hmm. That only moved the exception. File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line =20 421, in result3 rtype, rdata, rmsgid, serverctrls =3D ldap_result ValueError: need more than 3 values to unpack I put the statement above into a try..except block and checked the =20 value when the exception occurs. This line ldap_result =3D self._ldap_call(self._l.result3,msgid,all,timeout) assigns (None,None,None) to ldap_result, a 3-tuple instead of a 4-tuple. Once data becomes available from the LDAP server, then it returns a 4-=20= tuple as expected. Yancey On Jan 29, 2008, at 2:48 AM, Michael Str=F6der wrote: > Yeargan Yancey wrote: >> >> I am trying to use the asynchronous LDAP polling feature and have a >> question about what appears to be a timing issue. When I run the code >> below, I find that I must insert a sleep() before entering the while >> loop or I get a ValueError exception. >> [..] >> File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line =20= >> 415, >> in result3 >> rtype, rdata, rmsgid, serverctrls =3D >> self._ldap_call(self._l.result3,msgid,all,timeout) >> ValueError: need more than 3 values to unpack > > Hmm, this should never happen. I guess it's caused by _ldap.result3() > returning NULL for the situation where no result was received at =20 > all. I > will look into it. > > In the meantime try if the patch to LDAPObject.py attached solves your > problem. > > Ciao, Michael.<valueerror_in_result3.patch> |