[Grok-dev] Catalog/Indexes/Search error

Sebastian Ware sebastian at urbantalk.se
Tue Dec 29 05:13:54 EST 2009


I am still using --zopectl layouts so I am not too comfortable with  
the tracebacks you get from Paste. Anyway, I saw a DuplicationError  
somewhere. Maybe you have two indexes with the same name? There are  
some other errors in the traceback (missing site manager) that might  
be clues. But I am not very good with Paster tracebacks.

Mvh Sebastian

29 dec 2009 kl. 09.05 skrev Kathy Manwaring:

> Hi all (but particularly Sebastian Ware):
>
> After a day spent trying to get Catalog/Indexes happening, I ended up
> going back to try the tutorial:
> http://grok.zope.org/documentation/how-to/implementing-search
>
> Having done the tutorial, changing the minimum versions to those  
> required
> by the packages and doing the required from xx import yy lines, I  
> get the
> following error:
> Module paste.evalexception.middleware:306 in respond
> <<          try:
>                __traceback_supplement__ = errormiddleware.Supplement,
> self, environ
>                app_iter = self.application(environ,
> detect_start_response)
>                try:
>                    return_iter = list(app_iter)>>  app_iter =
> self.application(environ, detect_start_response)
> Module paste.translogger:68 in __call__
> <<              self.write_log(environ, method, req_uri, start,  
> status,
> bytes)
>                return start_response(status, headers)
>            return self.application(environ,  
> replacement_start_response)
>
>        def write_log(self, environ, method, req_uri, start, status,
> bytes):>>  return self.application(environ,
> replacement_start_response)
> Module zope.app.wsgi:55 in __call__
> <<          handle_errors = environ.get('wsgi.handleErrors', True)
>
>            request = publish(request, handle_errors=handle_errors)
> response = request.response>>  request = publish(request,
> handle_errors=handle_errors)
> Module zope.publisher.publish:133 in publish
> <<                              publication.afterTraversal(request,  
> obj)
>
>                                result =  
> publication.callObject(request,
> obj)
>                                response = request.response
>                                if result is not response:>>  result =
> publication.callObject(request, obj)
> Module grok.publication:89 in callObject
> <<          if checker is not None:
>                checker.check(ob, '__call__')
>            return super(ZopePublicationSansProxy,
> self).callObject(request, ob)>>  return
> super(ZopePublicationSansProxy, self).callObject(request, ob)
> Module zope.app.publication.zopepublication:167 in  
> callObject         <<
>        def callObject(self, request, ob):
>            return mapply(ob, request.getPositionalArguments(),  
> request)
>
>        def afterCall(self, request, ob):>>  return mapply(ob,
> request.getPositionalArguments(), request)
>
> <grokui.admin.view.Add object at 0x031A05F0>
>
>
> Module zope.publisher.publish:108 in mapply
> <<
>        if __debug__:
>            return debug_call(obj, args)
>
>        return obj(*args)>>  return debug_call(obj, args)
> Module zope.publisher.publish:114 in debug_call
> <<  def debug_call(obj, args):
>        # The presence of this function allows us to set a pdb  
> breakpoint
> return obj(*args)
>
>    def publish(request, handle_errors=True):>>  return obj(*args)
> Module grokcore.view.components:64 in __call__
> <<          if template is not None:
>                return self._render_template()
>            return mapply(self.render, (), self.request)
>
>        def _render_template(self):>>  return mapply(self.render, (),
> self.request)
>
> <bound method Add.render of <grokui.admin.view.Add object at  
> 0x031A05F0>>
>
>
> Module zope.publisher.publish:108 in mapply
> <<
>        if __debug__:
>            return debug_call(obj, args)
>
>        return obj(*args)>>  return debug_call(obj, args)
> Module zope.publisher.publish:114 in debug_call
> <<  def debug_call(obj, args):
>        # The presence of this function allows us to set a pdb  
> breakpoint
> return obj(*args)
>
>    def publish(request, handle_errors=True):>>  return obj(*args)
> Module grokui.admin.view:88 in render
> <<                                          name=application)
>            try:
>                self.context[name] = app()
>                self.flash(u'Added %s `%s`.' % (application, name))
>            except DuplicationError:>>  self.context[name] = app()
> Module zope.app.folder.folder:94 in __setitem__
> <<              raise DuplicationError("name, %s, is already in use"  
> % name)
>
>            setitem(self, self.data.__setitem__, name, object)
>
>        def __delitem__(self, name):>>  setitem(self,
> self.data.__setitem__, name, object)
> Module zope.app.container.contained:591 in setitem
> <<      setitemf(name, object)
>        if event:
>            notify(event)
>            notifyContainerModified(container)>>  notify(event)
> Module zope.event:23 in notify
> <<  def notify(event):
>        for subscriber in subscribers:
>            subscriber(event)>>  subscriber(event)
> Module zope.component.event:26 in dispatch
> <<  def dispatch(*event):
>        # iterating over subscribers assures they get executed
>        for ignored in zope.component.subscribers(event, None):
>            pass
>    zope.event.subscribers.append(dispatch)>>  for ignored in
> zope.component.subscribers(event, None):
> Module zope.component._api:130 in subscribers
> <<          # Oh blast, no site manager. This should *never* happen!
>            return []
>        return sitemanager.subscribers(objects, interface)
>
>    def handle(*objects):>>  return sitemanager.subscribers(objects,
> interface)
> Module zope.component.registry:290 in subscribers
> <<
>        def subscribers(self, objects, provided):
>            return self.adapters.subscribers(objects, provided)
>
>        def registerHandler(self,>>  return
> self.adapters.subscribers(objects, provided)
> Module zope.interface.adapter:535 in subscribers
> <<              result = ()
>                for subscription in subscriptions:
>                    subscription(*objects)
>            else:
>                result = []>>  subscription(*objects)
> Module zope.component.event:33 in objectEventNotify
> <<  def objectEventNotify(event):
>        """Event subscriber to dispatch ObjectEvents to interested
> adapters."""
>        adapters = zope.component.subscribers((event.object, event),  
> None)
> for adapter in adapters:
>            pass # getting them does the work>>  adapters =
> zope.component.subscribers((event.object, event), None)
> Module zope.component._api:130 in subscribers
> <<          # Oh blast, no site manager. This should *never* happen!
>            return []
>        return sitemanager.subscribers(objects, interface)
>
>    def handle(*objects):>>  return sitemanager.subscribers(objects,
> interface)
> Module zope.component.registry:290 in subscribers
> <<
>        def subscribers(self, objects, provided):
>            return self.adapters.subscribers(objects, provided)
>
>        def registerHandler(self,>>  return
> self.adapters.subscribers(objects, provided)
> Module zope.interface.adapter:535 in subscribers
> <<              result = ()
>                for subscription in subscriptions:
>                    subscription(*objects)
>            else:
>                result = []>>  subscription(*objects)
> Module grok.meta:499 in __call__
> <<          for name, index in self.indexes.items():
>                try:
>                    index.setup(catalog, name, self.context,
> self.module_info)
>                except DuplicationError:
>                    raise GrokError(>>  index.setup(catalog, name,
> self.context, self.module_info)
> Module grok.index:89 in setup
> <<                                           interface=context,
>                                             field_callable=call,
>                                             *self._args, **self._kw)
>
>    class Field(IndexDefinition):>>  *self._args, **self._kw)
> Module zope.app.container.btree:93 in __setitem__
> <<
>        def __setitem__(self, key, value):
>            setitem(self, self._setitemf, key, value)
>
>        def __delitem__(self, key):>>  setitem(self, self._setitemf,  
> key,
> value)
> Module zope.app.container.contained:591 in setitem
> <<      setitemf(name, object)
>        if event:
>            notify(event)
>            notifyContainerModified(container)>>  notify(event)
> Module zope.event:23 in notify
> <<  def notify(event):
>        for subscriber in subscribers:
>            subscriber(event)>>  subscriber(event)
> Module zope.component.event:26 in dispatch
> <<  def dispatch(*event):
>        # iterating over subscribers assures they get executed
>        for ignored in zope.component.subscribers(event, None):
>            pass
>    zope.event.subscribers.append(dispatch)>>  for ignored in
> zope.component.subscribers(event, None):
> Module zope.component._api:130 in subscribers
> <<          # Oh blast, no site manager. This should *never* happen!
>            return []
>        return sitemanager.subscribers(objects, interface)
>
>    def handle(*objects):>>  return sitemanager.subscribers(objects,
> interface)
> Module zope.component.registry:290 in subscribers
> <<
>        def subscribers(self, objects, provided):
>            return self.adapters.subscribers(objects, provided)
>
>        def registerHandler(self,>>  return
> self.adapters.subscribers(objects, provided)
> Module zope.interface.adapter:535 in subscribers
> <<              result = ()
>                for subscription in subscriptions:
>                    subscription(*objects)
>            else:
>                result = []>>  subscription(*objects)
> Module zope.component.event:33 in objectEventNotify
> <<  def objectEventNotify(event):
>        """Event subscriber to dispatch ObjectEvents to interested
> adapters."""
>        adapters = zope.component.subscribers((event.object, event),  
> None)
> for adapter in adapters:
>            pass # getting them does the work>>  adapters =
> zope.component.subscribers((event.object, event), None)
> Module zope.component._api:130 in subscribers
> <<          # Oh blast, no site manager. This should *never* happen!
>            return []
>        return sitemanager.subscribers(objects, interface)
>
>    def handle(*objects):>>  return sitemanager.subscribers(objects,
> interface)
> Module zope.component.registry:290 in subscribers
> <<
>        def subscribers(self, objects, provided):
>            return self.adapters.subscribers(objects, provided)
>
>        def registerHandler(self,>>  return
> self.adapters.subscribers(objects, provided)
> Module zope.interface.adapter:535 in subscribers
> <<              result = ()
>                for subscription in subscriptions:
>                    subscription(*objects)
>            else:
>                result = []>>  subscription(*objects)
> Module zope.app.catalog.catalog:162 in indexAdded
> <<           True
>           """
>        index.__parent__.updateIndex(index)
>
>    def indexDocSubscriber(event):>>   
> index.__parent__.updateIndex(index)
> Module zope.app.catalog.catalog:104 in updateIndex
> <<
>        def updateIndex(self, index):
>            for uid, obj in self._visitSublocations() :
>                index.index_doc(uid, obj)>>  for uid, obj in
> self._visitSublocations() :
> Module zope.app.catalog.catalog:99 in _visitSublocations
> <<                  return
>            if uidutil is None:
>                uidutil = component.getUtility(IIntIds)
>            for uid in uidutil:
>                yield uid, uidutil.getObject(uid)>>  uidutil =
> component.getUtility(IIntIds)
> Module zope.component._api:207 in getUtility
>
> context	None
>
> interface	<InterfaceClass zope.app.intid.interfaces.IIntIds>
>
> name	''
>
> utility	None
>
>
> <<      if utility is not None:
>            return utility
>        raise ComponentLookupError(interface, name)
>
>    def queryUtility(interface, name='', default=None, context=None):>>
> raise ComponentLookupError(interface, name)
> ComponentLookupError: (<InterfaceClass  
> zope.app.intid.interfaces.IIntIds>,
> '')
>
> (The last line is exactly the same as I got after putting Catalog  
> into my
> own software).
>
> Can someone please tell me what has gone wrong and how to fix it?
>
> Thanks,
> Kathy
>
>
>
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list