[Grok-dev] Create index catalog in Zope3 management interface

Simon Jagoe azriphale at gmail.com
Thu Nov 12 12:05:14 EST 2009


I have recently started using Grok 1.0 to develop an application. I am
now looking into indexing items in the ZODB, and one thing I was
trying to do is add and manipulate catalogs through the Zope3
management interface at http://localhost:8080/app/++etc++site/ .

I have created a new catalog through the interface, but when I try to
create index fields to this catalog, I get the traceback below
(ForbiddenAttribute on the keys() method of my grok.Application) in
the console. If I use the app.keys() method in my application,
everything seems to be OK (the zope.manager user does have access to
this attribute). Do I need to add some rules to the ZCML or is there
some other way to build indexes after the application has been

This error occurs in a fresh application created using the grokproject
command. Can anybody provide me some pointers of where to look?

Traceback (most recent call last):
  File "/home/simon/.buildout/eggs/zope.publisher-3.4.9-py2.5.egg/zope/
publisher/publish.py", line 133, in publish
    result = publication.callObject(request, obj)
  File "/home/simon/.buildout/eggs/grok-1.0-py2.5.egg/grok/
publication.py", line 89, in callObject
    return super(ZopePublicationSansProxy, self).callObject(request,
  File "/home/simon/.buildout/eggs/zope.app.publication-3.4.3-
py2.5.egg/zope/app/publication/zopepublication.py", line 167, in
    return mapply(ob, request.getPositionalArguments(), request)
  File "/home/simon/.buildout/eggs/zope.publisher-3.4.9-py2.5.egg/zope/
publisher/publish.py", line 108, in mapply
    return debug_call(obj, args)
  File "/home/simon/.buildout/eggs/zope.publisher-3.4.9-py2.5.egg/zope/
publisher/publish.py", line 114, in debug_call
    return obj(*args)
  File "/home/simon/.buildout/eggs/zope.app.rotterdam-3.4.1-py2.5.egg/
zope/app/rotterdam/xmlobject.py", line 240, in singleBranchTree
    return view()
  File "/home/simon/.buildout/eggs/zope.app.publisher-3.5.1-py2.5.egg/
zope/app/publisher/browser/viewmeta.py", line 418, in __call__
    return meth(*a, **k)
  File "/home/simon/.buildout/eggs/zope.app.rotterdam-3.4.1-py2.5.egg/
zope/app/rotterdam/xmlobject.py", line 177, in singleBranchTree
    keys = list(item.keys())
ForbiddenAttribute: ('keys', <indexing.app.Indexing object at

indexing.app.Indexing is the application class inheriting from
grok.Application and grok.Container.


More information about the Grok-dev mailing list