Jason Randell wrote at 2004-1-8 09:58 -0800:
I am trying to write a python script that will automatically recatalog my Zcatalog. Unfortunately I keep getting an error that I can't get past. Here is a code snippet with some minor changes to protect the innocent: ... container.GALEN_Catalog.manage_catalogFoundItems(request, RESPONSE, url2, url1, monkey)
# I have also just tried obj_metatypes=['Page Template'], obj_expr='not noindex' instead of the monkey list
I get an indexError: List index out of range. Here is the traceback: Traceback (innermost last): .... - <PythonScript at /cron_test.py> - Line 22 Module Products.ZCatalog.ZCatalog, line 306, in manage_catalogFoundItems IndexError: list index out of range
line 306 in ZCatalog is: obj = REQUEST.PARENTS[1]
"manage_catalogFoundItems" expects to be called via the Web only. Iterate over the list of objects you want to catalog and call "catalog_object" on them. -- Dieter