[Zope] Name Error / Global name not defined
Bernd Dorn
zope-mailinglist at mopa.at
Fri Sep 19 08:14:00 EDT 2003
Sandeep Chopra wrote:
> Hi,
> Im getting an error in a DTML document while trying to
> access an array
> I declared in a python script which I subsequently
> returned.
>
> The python script looks like:
>
> # Creates a pending array
>
> pendingArray = ['test']
> return pendingArray
>
> and is called by this line in the DTML document.
> <dtml-call expr="createPendingArray()">
>
> The line that is causing the error to be thrown is:
>
> <dtml-call
> expr="addEntryPendingArray(pendingArray,Word)">
> which causes the following error:
>
> Error Type: NameError
> Error Value: global name 'pendingArray' is not defined
>
>
> Any help in this matter would be greatly appreciated..
> Thanks in advance..
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
try this:
1:
<dtml-let pendingArray="createPendingArray()">
...
<dtml-call expr="addEntryPendingArray(pendingArray,Word)">
...
</dtml-let>
cheers, bernd
More information about the Zope
mailing list