[Zope] Fwd: [Zope] LDAP won't work - yes I've applied the patch

zope zope@isp.lu
Thu, 05 Oct 2000 08:48:24 +0200


Hi.

In deed, I have the same problem.

As an example, my LDAP Method consists of the following filter: uid=*

With the following DTML-method, I'm getting data from my LDAP server.

<dtml-in searchPerson>
   <dtml-let counter=sequence-index>
     <dtml-var bla>: <dtml-var "searchPerson[counter]">
   </dtml-let>
</dtml-in>

The result contains the attributes with their value from the LDAPserver. 
When I'm trying to get the value of an attribute directly (i.e. with 
<dtml-var uid>), I'm getting the key error.

Any idea?

Marc LUDWIG


>From: Roman Milner <roman@speeder.org>
>Date: 05 Oct 2000 00:35:53 -0500
>Lines: 30
>User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Capitol Reef)
>Sender: zope-admin@zope.org
>X-Mailman-Version: 1.0b8
>List-Id: Users of the Z Object Publishing Environment <zope.zope.org>
>X-BeenThere: zope@zope.org
>
>I'm trying to get ldap methods to work with 2.2.2.  I can access the
>attributes of the objects returned from an ldap method with a python
>extension fine, but dtml-in'ing the returned list doesn't work. I keep
>getting an error (traceback below).
>
>Any ideas?
>
>Thanks,
>^Roman
>
>
>Your action caused an unknown error to occur.
><!--
>Error Type: KeyError
>
>
>Traceback:
>Traceback (innermost last):
>   File /home/ThePoint/lib/python/ZPublisher/Publish.py, line 171, in publish
>   File /home/ThePoint/lib/python/ZPublisher/mapply.py, line 160, in mapply
>     (Object: ltest)
>   File /home/ThePoint/lib/python/ZPublisher/Publish.py, line 112, in 
> call_object
>     (Object: ltest)
>   File /home/ThePoint/lib/python/OFS/DTMLMethod.py, line 172, in __call__
>     (Object: ltest)
>   File /home/ThePoint/lib/python/DocumentTemplate/DT_String.py, line 528, 
> in __call__
>     (Object: ltest)
>   File /home/ThePoint/lib/python/DocumentTemplate/DT_In.py, line 691, in 
> renderwob
>     (Object: ldap_user(uid='rmilner'))
>KeyError: cn