Description

If I do use xapian_stemming = True and building the index I got this traceback.txt

I do use Xapian 1.0.

-- ReimarBauer 2007-05-23 16:57:50

Steps to reproduce

Example

Component selection

Details

MoinMoin Version

1.6dev

OS and Version

SuSE 10.2

Python Version

2.5

Server Setup

cgi

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

(!) Please add details about the Stemmer software used.

This looks like an error in the Stemmer, not in moin.

I have used PyStemmer-1.0.1 from the site http://snowball.tartarus.org/download.php, http://snowball.tartarus.org/wrappers/PyStemmer-1.0.1.tar.gz

Can you try again with Python 2.4 (I used the same PyStemmer with Py 2.4.4 without problems). -- ThomasWaldmann 2007-05-27 12:56:56

Using Version 1.0 gives this traceback

moin --config-dir=/srv/share/moin/Docu  --wiki-url=http://localhost/Docu index build --mode=rebuild
Traceback (most recent call last):
  File "/usr/local/bin/moin", line 6, in <module>
    run()
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/script/moin.py", line 15, in run
    MoinScript().run(showtime=0)
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/script/__init__.py", line 137, in run
    self.mainloop()
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/script/__init__.py", line 244, in mainloop
    plugin_class(args[2:], self.options).run() # all starts again there
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/script/__init__.py", line 137, in run
    self.mainloop()
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/script/index/build.py", line 35, in mainloop
    self.command()
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/script/index/build.py", line 42, in command
    Index(self.request).indexPages(self.files, self.options.mode)
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/search/builtin.py", line 262, in indexPages
    self._index_pages(request, files, mode)
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/search/Xapian.py", line 641, in _index_pages
    mode)
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/search/Xapian.py", line 460, in _index_page
    language, stem_language = self._get_languages(page)
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/search/Xapian.py", line 397, in _get_languages
    Stemmer(lang)
  File "Stemmer.pyx", line 105, in Stemmer.Stemmer.__init__
TypeError: exceptions must be strings, classes, or instances, not exceptions.KeyError

The check of Stemmer(lang) has a bug if lang is an unsupported language for libstemmer_c. e.g. stem_UTF_8_romanian is missing by the one used in PyStemmer-1.0.1. An actual version of the library has it inluded.

A workaround could be catching the TypeError.

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.6devXapianPyStemmerFails (last edited 2007-10-29 19:19:31 by localhost)