ldap.schema: str2objectclass() fails

Michael Ströder michael at stroeder.com
Tue Jul 30 11:42:58 CEST 2002


Hans Aschauer wrote:
> On Montag, 29. Juli 2002 18:46, Michael Ströder wrote:
> 
> I made changes to schema.c and schema.py in order to actually pass the 
> flag to the C functions:
> [...]
> Seems to work. Please test.

Thanks. It gets further but still chokes with schema of Netscape 
DS 4.16SP1 on some object classes although called with 
schema_allow=31.

Can you point me to where are the error codes described in OpenLDAP?

You can check yourself by invoking recently checked in Demo/schema.py:

$ python Demo/schema.py ldap://memberdir.netscape.com/

memberdir.netscape.com is a iPlanet-Directory/5.0 B2001.109.0903.

Feel free to use web2ldap's [ConnInfo] feature to find out more 
about demo servers mentioned there.

It also does not work with www.nldap.com (Novell eDirectory 8.7).

$ python Demo/schema.py ldap://www.nldap.com/
*** Schema from 'cn=schema'
Error: 5: ( smssmdrclass-oid NAME 'sMSSMDRClass' DESC 'Standard 
ObjectClass' SUP resource STRUCTURAL MAY ( status $ Version $ 
sAPName $ sMSRegisteredService $ sMSProtocolAddress ) X-NDS_NAME 
'SMS SMDR Class' X-NDS_NOT_CONTAINER '1' )Traceback (most recent 
call last):
   File "Demo/schema.py", line 27, in ?
     schema = 
ldap.schema.subSchema(subschemasubentry_entry,schema_allow=31)
   File "/usr/lib/python2.2/site-packages/ldap/schema.py", line 
154, in __init__
     se = SCHEMA_CLASS_MAPPING[attr_type](attr_value,schema_allow)
   File "/usr/lib/python2.2/site-packages/ldap/schema.py", line 
47, in __init__
     (
   File "/usr/lib/python2.2/site-packages/ldap/schema.py", line 
20, in str2objectclass
     return 
ldap.functions._ldap_function_call(_ldap.str2objectclass,schema_element_str,schema_allow)
   File "/usr/lib/python2.2/site-packages/ldap/__init__.py", line 
56, in _ldap_function_call
     result = apply(func,args,kwargs)
SystemError: NULL result without error in PyObject_Call

Ciao, Michael.






More information about the python-ldap mailing list