Roundup Tracker - Issues

Message586

Author anonymous
Recipients
Date 2003-01-12.19:45:38
Message-id
In-reply-to
I've got a problem when performing full-text search.
The issue was noticed in  roundup 0.5.4 on python2.2.
Not all searches fail, but only with particular words...

When I trying to search with something entered in "All
text" field, I get this traceback:

======8<=================================

A problem occurred in your template "issue.index". 
Full traceback: 
Traceback (most recent call last):
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/client.py", line 368, in renderContext
    return pt.render(self, None, None, **args)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/templating.py", line 187, in render
    getEngine().getContext(c), output, tal=1, 
strictinsert=0)()
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 154, in 
__call__
    self.interpret(self.program)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 525, in 
do_useMacro
    self.interpret(macro)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 345, in 
do_optTag_tal
    self.do_optTag(stuff)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 330, in 
do_optTag
    return self.no_tag(start, program)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 325, in 
no_tag
    self.interpret(program)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 549, in 
do_defineSlot
    self.interpret(slot)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/TAL/TALInterpreter.py", line 402, in 
do_setLocal_tal
    self.engine.setLocal(name, self.engine.evaluateValue
(expr))
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/PageTemplates/TALES.py", line 225, in 
evaluate
    v = expression(self)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/PageTemplates/Expressions.py", line 
188, in __call__
    return self._eval(econtext)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/PageTemplates/Expressions.py", line 
183, in _eval
    return render(ob, econtext.vars)
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/PageTemplates/Expressions.py", line 
89, in render
    ob = ob()
  File "/usr/lib/python2.2/site-
packages/roundup/cgi/templating.py", line 1499, in batch
    matches = self.client.db.indexer.search(
  File "/usr/lib/python2.2/site-
packages/roundup/indexer.py", line 145, in search
    hits = self.find(search_terms)
  File "/usr/lib/python2.2/site-
packages/roundup/indexer.py", line 224, in find
    hits[k] = self.fileids[k]
KeyError: 508

======8<=================================

This is quick'n'dirty fix:

Index: roundup/indexer.py
===================================================================
RCS file: /var/lib/cvs/nkm/roundup/roundup/indexer.py,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 indexer.py
224c224,225
<                     hits[k] = self.fileids[k]
---
>                     if self.fileids.has_key(k):
>                         hits[k] = self.fileids[k]
History
Date User Action Args
2009-02-03 14:20:12adminlinkissue666767 messages
2009-02-03 14:20:12admincreate