yeah I have modified to this<br><br><span class="q">&lt;li tal:define = &quot;query here/testquery&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp; tal:repeat=&quot;result python:query(id=&#39;IT&#39;)&quot;&gt;<br></span><span class="q">&lt;span tal:replace=&quot;python:repeat[&#39;result&#39;].firstname&quot;&gt;First Name&lt;/span&gt;&amp;nbsp;<br>&nbsp;&nbsp;&lt;/li&gt;
<br><br>but get this as a result. Thanks for the reply.<br><br></span><span class="q">  Module 
Products.PTProfiler.ProfilerPatch, line 32, in __patched_call__<br>  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__<br></span>   - __traceback_info__: query(id=&#39;IT&#39;)<br>  Module Python expression &quot;query(id=&#39;IT&#39;)&quot;, line 1, in &lt;expression&gt;
<br>AttributeError: Results instance has no __call__ method<br><br><div><span class="gmail_quote">On 11/1/07, <b class="gmail_sendername">Paul Winkler</b> &lt;<a href="mailto:pw_lists@slinkp.com">pw_lists@slinkp.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Thu, Nov 01, 2007 at 12:48:04PM +0000, michael nt milne wrote:<br>&gt; Hi<br>&gt;<br>
&gt; I&#39;ve got this piece of code which is returning a keyerror on &#39;results&#39; as I<br>&gt; haven&#39;t set up a dictionary for the variables.<br>(snip)<br>&gt; &lt;span tal:define=&quot;query here/testquery&quot;&gt;
<br>&gt; &lt;li tal content=&quot;results python: query(id=&#39;IT&#39;)&quot;&gt;<br>&gt; &lt;span tal:replace=&quot;results/firstname&quot;&gt;First Name&lt;/span&gt;&amp;nbsp;<br>&gt; &lt;/li&gt;<br><br>&quot;&lt;li tal content&quot; doesn&#39;t make any sense.
<br><br>I suspect you want that to be:<br><br>&lt;li tal:define=&quot;results ...<br><br><br>--<br><br>Paul Winkler<br>_______________________________________________<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org
</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br><br clear="all"><br>-- <br>
michael