[Zope] Can't access a method 'in this context'

Tim Hicks tim@sitefusion.co.uk
Thu, 15 Aug 2002 15:12:41 +0100


I have a XronDTMLMethod with the following body:

----
<dtml-let zoffice="superValues(['ZOffice Converter'])[0]">
<dtml-call
"zoffice.getConverterByName('AsyncZlaveClient').fireNextConversion(_)">
</dtml-let>
----

So, it finds the nearest 'ZOffice Converter' instance (in the acquisition
chain), names it 'zoffice', then attempts to do the call in the middle line.

My ZOffice class has the following method defined:

----
def getConverterByName(self, converterName):
    """ """
    return self._pluginConverters[converterName].__of__(self)
----

self._pluginConverters is a class level dictionary with keys of converter
names and values of converter instances.  The converter instances inherit
from Acquisition.Implicit.

However, when I 'Trigger' the XronDTMLMethod, I get the following error:

----
Traceback (most recent call last):

  File "D:\Zlave\zope251\lib\python\Products\Xron\XronDTMLMethod.py", line
141, in trigger
    REQUEST=REQUEST, RESPONSE=RESPONSE, kw=kw)

  File "D:\Zlave\zope251\lib\python\OFS\DTMLMethod.py", line 127, in
__call__
    r=apply(HTML.__call__, (self, client, REQUEST), kw)

  File "D:\Zlave\zope251\lib\python\DocumentTemplate\DT_String.py", line
473, in __call__
    try: result = render_blocks(self._v_blocks, md)

  File "D:\Zlave\zope251\lib\python\DocumentTemplate\DT_Let.py", line 76, in
render
    return render_blocks(self.section, md)

  File "D:\Zlave\zope251\lib\python\DocumentTemplate\DT_Util.py", line 159,
in eval
    return eval(code, d)

  File "<string>", line 2, in f

  File "D:\Zlave\zope251\lib\python\AccessControl\DTML.py", line 29, in
guarded_getattr
    return guarded_getattr(*args)

  File "D:\Zlave\zope251\lib\python\AccessControl\ZopeGuards.py", line 58,
in guarded_getattr
    return inst.aq_acquire(name, aq_validate, validate)

  File "D:\Zlave\zope251\lib\python\AccessControl\ZopeGuards.py", line 40,
in aq_validate
    return validate(inst, obj, name, v)

  File "D:\Zlave\zope251\lib\python\AccessControl\SecurityManager.py", line
83, in validate
    self._context)

  File "D:\Zlave\zope251\lib\python\AccessControl\ZopeSecurityPolicy.py",
line 145, in validate
    raise Unauthorized(name, value)

Unauthorized: You are not allowed to access fireNextConversion in this
context
----

So, my question; why can't I call this method of my converter object?


cheers,

tim