folder.manage_addProducts ['Transience'].constructTransientObjectContainer might work (assuming "constructTransientObjectContainer" is the right constructor name, I didn't check).

- C

On Jun 20, 2006, at 9:39 AM, Jonathan wrote:

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,

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:
   - 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/, line 212, in ProcessControl
  Module <string>, line 1, in ?
  Module /apps/zope/Extensions/, line 219, in subtst
Module /apps/zope/Extensions/, 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,
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?!


Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to