[Zope] Strange error/traceback

Chris Withers chrisw@nipltd.com
Tue, 27 Feb 2001 19:03:19 -0000


>     l=ldap.open('medico.uwcm.ac.uk')
>     cn='cn='+cn

can you stick a print ldap.SCOP_SUBTREE in here?

>     l.search_s('',ldap.SCOPE_SUBTREE,cn) # this is where it fails
>     res=l.result()
>     auth=[res[1][0][0],pwd]
>     l.simple_bind_s(auth[0],auth[1])
>     l.unbind_s()
>     return 1

> > > argument 1: expected string without null bytes, string found

This sounds like argument 1 contains something like 'sample\000' and
search_s doesn't like it. I wonder if there's a null terminated string
coming back from a C function somewhere?

*stab*, nope, it's still dark in here ;-)

Chris