[python-ldap] Pyhton Ldap Error

Michael Ströder michael at stroeder.com
Wed Mar 7 10:56:24 CET 2012


Pratheesh Rajan wrote:
> I am getting a python ldap error
>
> Traceback (most recent call last):
> File "/appl/share/lookupservices/python/ldap_user_dl.py", line 172, in <module>
> udp = UserDlMapper(logger=logger)
> File "/appl/share/lookupservices/python/ldap_user_dl.py", line 46, in _/init/_
> self.page_results_control =
> SimplePagedResultsControl(ldap.LDAP_CONTROL_PAGE_OID, True,
> (self.conf['page_size'], ''))
> AttributeError: 'module' object has no attribute 'LDAP_CONTROL_PAGE_OID'

I guess your code was written for python-ldap 2.3.x and you're now using 
python-ldap 2.4.x. Which exact version are you using?

> How to use that correctly. could any one help me please.

In 2.4 there have been changes in the API for LDAPv3 extended controls. Please 
see Demo/page_control.py (and Demo/paged_search_ext_s.py) how to use the 
simple paged control with 2.4.

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2317 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20120307/f6495303/attachment.bin>


More information about the python-ldap mailing list