Roundup Tracker - Issues

Issue 1771414

classification
'Stem' object has no attribute 'stem_word'
Type: Severity: normal
Components: Database Versions:
process
Status: closed fixed
:
: jpend : jpend, rickbenavidez
Priority: high :

Created on 2007-08-10 04:46 by rickbenavidez, last changed 2007-09-05 18:47 by jpend.

Messages
msg2463 Author: [hidden] (rickbenavidez) Date: 2007-08-10 04:46
Looks like there might be some changes in the xapian bindings that round is using by default if they exist.  On a clean install on CentOS5, running python 2.4.3 with the stock python and xapian-bindings packages (and latest roundup) I'm getting an error when trying to create tickets:

In  /usr/lib/python2.4/site-packages/roundup/backends/indexer_xapian.py

Line 95:

           < term = stemmer.stem_word(word)
           > term = stemmer(word)

Info about the xapian binding changes:

http://lists.tartarus.org/pipermail/xapian-commits/2007-April/003162.html

And the complete stacktrace:

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/roundup/cgi/client.py", line 265, in inner_main
    html = self.handle_action()

  File "/usr/lib/python2.4/site-packages/roundup/cgi/client.py", line 820, in handle_action
    return action_klass(self).execute()

  File "/usr/lib/python2.4/site-packages/roundup/cgi/actions.py", line 39, in execute
    return self.handle()

  File "/usr/lib/python2.4/site-packages/roundup/cgi/actions.py", line 616, in handle
    messages = self._editnodes(props, links)

  File "/usr/lib/python2.4/site-packages/roundup/cgi/actions.py", line 426, in _editnodes
    newid = self._createnode(cn, props)

  File "/usr/lib/python2.4/site-packages/roundup/cgi/actions.py", line 481, in _createnode
    return cl.create(**props)

  File "/usr/lib/python2.4/site-packages/roundup/backends/rdbms_common.py", line 2603, in create
    content, mime_type)

  File "/usr/lib/python2.4/site-packages/roundup/backends/indexer_xapian.py", line 95, in add_text
    term = stemmer.stem_word(word)

AttributeError: 'Stem' object has no attribute 'stem_word'

Making the listed change seems to fix everything right up and I'm able to create tickets now without a problem.
msg2464 Author: [hidden] (jpend) Date: 2007-09-04 05:35
According to http://www.xapian.org/docs/deprecation.html the stem.stem_word syntax was deprecated in 0.9.0 and removed in 1.0.

0.9.0 was released ~2 years ago, so it is probably safe to make this change for the next roundup release.
msg2465 Author: [hidden] (jpend) Date: 2007-09-05 18:47
Committed to CVS, thanks!
History
Date User Action Args
2007-08-10 04:46:28rickbenavidezcreate