Ticket #1701 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Crash when reindexing the whole CPSLuceneCatalog

Reported by: ogrisel Assigned to: janguenot
Priority: P3 Milestone: CPS 3.4.2
Component: Lucene Version: TRUNK
Severity: major Keywords:
Cc:

Description

uid_view is not defined in that case:

Traceback (most recent call last):
  File "/opt/Zope-2.9/lib/python/ZPublisher/Publish.py", line 114, in publish
    request, bind=1)
  File "/opt/Zope-2.9/lib/python/ZPublisher/mapply.py", line 88, in mapply
    if debug is not None: return debug(object,args,context)
  File "/opt/Zope-2.9/lib/python/ZPublisher/Publish.py", line 40, in call_object
    result=apply(object,args) # Type s<cr> to step into published object.
  File "/home/ogrisel/instances/dgme/Products/CPSLuceneCatalog/catalog.py", line 438, in manage_reindexProxies
    self.reindexObject(proxy, idxs=list(idxs))
  File "/home/ogrisel/instances/dgme/Products/CPSLuceneCatalog/catalog.py", line 232, in reindexObject
    self.catalog_object(object, uid, idxs, update_metadata)
  File "/home/ogrisel/instances/dgme/Products/CPSLuceneCatalog/catalog.py", line 336, in catalog_object
    uid = uid_view + '/' + lang
UnboundLocalError: local variable 'uid_view' referenced before assignment

http://svn.nuxeo.org/trac/pub/changeset/46940

Change History

07/17/06 19:18:29 changed by ogrisel

The following seems to fix the pbm, but I'm not sure what's really wanted:

Index: catalog.py
===================================================================
--- catalog.py  (révision 47137)
+++ catalog.py  (copie de travail)
@@ -304,9 +304,9 @@

         # We reindex a normal proxy.
         had_languages = []
+        uid_view = uid + '/' + cpsutils.KEYWORD_VIEW_LANGUAGE
         if self.multilanguage_support:
             # Find what languages are in the catalog for this proxy
-            uid_view = uid + '/' + cpsutils.KEYWORD_VIEW_LANGUAGE
             for brain in self.unrestrictedSearchResults(path=uid_view):
                 path = brain.getPath()
                 had_languages.append(path[path.rindex('/')+1:])

07/18/06 11:38:32 changed by ogrisel

  • status changed from new to closed.
  • resolution set to fixed.