[Zope] Problem with constructTransientObjectContainer

Jonathan dev101 at magma.ca
Tue Jun 20 09:39:45 EDT 2006


I have an external method that is trying to create a Transient Object Container in a 'temp_folder', as follows:

def BuildGarbageCollector(self):
        folder = self.restrictedTraverse('Coz/TempImages')          # Coz/TempImages already exists

        folder.constructTransientObjectContainer(self, id='GarbageCollector', timeout_mins=10, limit=0,
                delNotification=BASEFOLDER+'DeleteTempImage')



and I get the following error:

Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - <DTMLMethod at /Coz/WUI/tst>
   - URL: http://192.168.123.2:8080/Coz/WUI/tst/manage_main
   - Physical Path: /Coz/WUI/tst
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module DocumentTemplate.DT_Let, line 75, in render
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: document_id
  Module <string>, line 1, in <expression>
  Module Products.ExternalMethod.ExternalMethod, line 232, in __call__
   - __traceback_info__: (('tst',), {}, None)
  Module /apps/zope/Extensions/cozumo.py, line 212, in ProcessControl
  Module <string>, line 1, in ?
  Module /apps/zope/Extensions/cozumo.py, line 219, in subtst
  Module /apps/zope/Extensions/cozumo.py, line 2473, in BuildGarbageCollector
AttributeError: constructTransientObjectContainer


      
If I change the external method as follows (remove the reference to 'folder'):
        constructTransientObjectContainer(self, id='GarbageCollector', timeout_mins=10, limit=0,
                delNotification=BASEFOLDER+'DeleteTempImage')

There is no error, but the TOC is created in the wrong folder.  I can manually (thru the ZMI) add a TOC to the TempImages folder, but I can't create one programmatically.

Can anyone point me in the right direction?!

Thanks,

Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060620/1f77e1ca/attachment.htm


More information about the Zope mailing list