peculiar problem

Anil Jangity anilj at entic.net
Tue Feb 27 00:27:01 CET 2007


I notice this in other areas of my code as well.

Here is a trace of a modify:

*** ldap://host:389 - SimpleLDAPObject.modify_ext (('cn=Shilpa J,
uid=anilj, ou=People, o=entic.net', [(0, 'mail',
[u'shilpa.j at something.com'])], None, None),{})
Error - <type 'exceptions.TypeError'>: ('expected a string in the
list', u'shilpa.j at something.com')


The problem is, it seems work on and off. When the modifications or
searches are done without the unicode string,  it works. But later
when I try to do the same thing again for some reason it trys to do
the LDAP operation using unicode lists: [u'abc']

Thats when it fails.

Is it something else in my code that is causing it or is something
else wrong in the python-ldap?

I'll see if I can find more details/code. I was just wondering if you
guys knew off the top of your heads...





On 2/25/07, Michael Ströder <michael at stroeder.com> wrote:
> Anil Jangity wrote:
> >
> > url = ''.join((self.server, base, '?', attr, '?', scope, '?', filter, '?'))
> > try:
> >     print url
> >     ldap_url = ldapurl.LDAPUrl(url)
>
> BTW: See also 2nd example on
>
> http://python-ldap.sourceforge.net/doc/python-ldap/ldapurl-example.html
>
> Ciao, Michael.
>



More information about the python-ldap mailing list