it is context.REQUEST.RESPONSE rr Am Freitag, 2. Mai 2003 10:28 schrieb Williams, Rhian:
I am trying to write a python script to update a Zcatalog object which I can then run automatically via Xron. Below is the method I am trying to call, I do not know how to set the parameters properly manage_catalogReindex(REQUEST, RESPONSE, URL1) Below is my attempt and the resultant errors
context.myCatalog.manage_catalogReindex(context.REQUEST, context.RESPONSE, context.myFolder.absolute_url) return "completed"
myCatalog = ZCatalog object, myFolder = the folder in which the catalog object is saved
I receive the following error
Error Type: AttributeError Error Value: RESPONSE
<pre onclick="this.firstChild.data=this.lastChild.data"> §<!-- Traceback (innermost last): File D:\Zope\lib\python\ZPublisher\Publish.py, line 150, in publish_module File D:\Zope\lib\python\ZPublisher\Publish.py, line 114, in publish File D:\Zope\lib\python\Zope\__init__.py, line 158, in zpublisher_exception_hook (Object: rhian) File D:\Zope\lib\python\ZPublisher\Publish.py, line 98, in publish File D:\Zope\lib\python\ZPublisher\mapply.py, line 88, in mapply (Object: test) File D:\Zope\lib\python\ZPublisher\Publish.py, line 39, in call_object (Object: test) File D:\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line 252, in __call__ (Object: test) File D:\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line 283, in _bindAndExec (Object: test) File D:\Zope\lib\python\Products\PythonScripts\PythonScript.py, line 291, in _exec (Object: test) (Info: ({'script': <PythonScript instance at 104209B0>, 'context': <Folder instance at 10292250>, 'container': <Folder instance at 10292250>, 'traverse_subpath': []}, (), {}, None)) File Script (Python), line 1, in test File D:\Zope\lib\python\AccessControl\ZopeGuards.py, line 47, in guarded_getattr (Object: rhian) AttributeError: (see above)
Any help greatly appreciated Regards, --></pre> Rhian Williams ZIT IB Securities ------------------------------------ DLZ 2 01.57.0440 Mainzer Landstr. 153 60327 Frankfurt ------------------------------------ Tel: +49 69 136 48319 Fax:+49 69 136 42540
_______________________________________________ Zope maillist - Zope@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 )
-- mit freundlichen GrĂ¼ssen Robert Rottermann www.redCOR.ch