Description

I just did a title search with the xapian search enabled and receive an IndexError list index out of range. If i doing the same search on another wiki instance (also with the same xapian search and wiki version (farmwiki) ) the error not occur! Rebuilding manual the Index helps!

Interesting is only that the SystemInfo shows up that everything with the xapian (and also the index) is ok. I also received this error not the first time! it's comming and going.. every few weeks, i guess!

Steps to reproduce

  1. not possible due the rebuild of the index

Example

Component selection

Details

--> -->

IndexError

list index out of range

If you want to report a bug, please save this page and attach it to your bug report.

Traceback

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

  1. /home2/lotek/lib/python2.5/site-packages/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_standalone.Request object at 0xb139508c>)

    1. 1281 self.page.send_page(msg=msg)
    2. 1282 else:
    3. 1283 handler(self.page.page_name, self)
    4. 1284
    5. 1285 # every action that didn't use to raise MoinMoinNoFooter must call this now:
    • handler = <function execute at 0xb1405c6c>
    • self = <MoinMoin.request.request_standalone.Request object at 0xb139508c>
    • self.page = <MoinMoin.Page.Page object at 0xb0490c8c>
    • self.page.page_name = u'Index'
  2. /home/lotek/lib/python2.5/site-packages/MoinMoin/action/fullsearch.py in execute (pagename=u'Index', request=<MoinMoin.request.request_standalone.Request object at 0xb139508c>, fieldname='value', titlesearch=1, statistic=0)

    1. 185 query = QueryParser(case=case, regex=regex,
    2. 186 titlesearch=titlesearch).parse_query(needle)
    3. 187 results = searchPages(request, query, sort, mtime, historysearch)
    4. 188 except ValueError: # catch errors in the search query
    5. 189 err = _('Your search query {{{"%s"}}} is invalid. Please refer to '
    • results undefined
    • searchPages = <function searchPages at 0xb1405df4>
    • request = <MoinMoin.request.request_standalone.Request object at 0xb139508c>
    • query = <MoinMoin.search.queryparser.TitleSearch instance at 0xb0eeb6cc>
    • sort = 'page_name'
    • mtime = None
    • historysearch = 0
  3. /home/lotek/lib/python2.5/site-packages/MoinMoin/search/__init__.py in searchPages (request=<MoinMoin.request.request_standalone.Request object at 0xb139508c>, query=<MoinMoin.search.queryparser.TitleSearch instance at 0xb0eeb6cc>, sort='page_name', mtime=None, historysearch=0, **kw={})

    1. 30 if isinstance(query, str) or isinstance(query, unicode):
    2. 31 query = QueryParser(**kw).parse_query(query)
    3. 32 return Search(request, query, sort, mtime=mtime,
    4. 33 historysearch=historysearch).run()
    5. 34
    • historysearch = 0
    • ).run undefined
  4. /home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py in run (self=<MoinMoin.search.builtin.Search instance at 0xb0eebfac>)

    1. 454 start = time.time()
    2. 455 if self.request.cfg.xapian_search:
    3. 456 hits = self._xapianSearch()
    4. 457 logging.debug("search: _xapianSearch found %d hits" % len(hits))
    5. 458 else:
    • hits undefined
    • self = <MoinMoin.search.builtin.Search instance at 0xb0eebfac>
    • self._xapianSearch = <bound method Search._xapianSearch of <MoinMoin.search.builtin.Search instance at 0xb0eebfac>>
  5. /home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py in _xapianSearch (self=<MoinMoin.search.builtin.Search instance at 0xb0eebfac>)

    1. 551 clock.start('_xapianProcess')
    2. 552 try:
    3. 553 return self._getHits(hits, self._xapianMatch)
    4. 554 finally:
    5. 555 clock.stop('_xapianProcess')
    • self = <MoinMoin.search.builtin.Search instance at 0xb0eebfac>
    • self._getHits = <bound method Search._getHits of <MoinMoin.search.builtin.Search instance at 0xb0eebfac>>
    • hits = [{'score': 100, 'uid': 918, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'WikiKurs/01 Was ist ein MoinMoin-Wiki?', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 780, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'WikiCourse/01 What is a MoinMoin wiki?', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 1123, 'values': {'attachment': u'moinmoin-addons.zip', 'mtime': u' 1181836688000000', 'pagename': u'MoinMoinWiki1.5', 'revision': u'0', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 645, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'MoinMoin/TextFormatting', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 606, 'values': {'attachment': u'', 'mtime': u'1197411582064754', 'pagename': u'Data/MoinMoin', 'revision': u'2', 'wikiname': u'LotekHeavy'}}, {'score': 97, 'uid': 923, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'MoinMoin', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 88, 'uid': 599, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'MoinMoin/InstallDocs', 'revision': u'1', 'wikiname': u'LotekHeavy'}}]
    • self._xapianMatch = <bound method Search._xapianMatch of <MoinMoin.search.builtin.Search instance at 0xb0eebfac>>
  6. /home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py in _getHits (self=<MoinMoin.search.builtin.Search instance at 0xb0eebfac>, pages=[{'score': 100, 'uid': 918, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'WikiKurs/01 Was ist ein MoinMoin-Wiki?', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 780, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'WikiCourse/01 What is a MoinMoin wiki?', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 1123, 'values': {'attachment': u'moinmoin-addons.zip', 'mtime': u' 1181836688000000', 'pagename': u'MoinMoinWiki1.5', 'revision': u'0', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 645, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'MoinMoin/TextFormatting', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 100, 'uid': 606, 'values': {'attachment': u'', 'mtime': u'1197411582064754', 'pagename': u'Data/MoinMoin', 'revision': u'2', 'wikiname': u'LotekHeavy'}}, {'score': 97, 'uid': 923, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'MoinMoin', 'revision': u'1', 'wikiname': u'LotekHeavy'}}, {'score': 88, 'uid': 599, 'values': {'attachment': u'', 'mtime': u'0', 'pagename': u'MoinMoin/InstallDocs', 'revision': u'1', 'wikiname': u'LotekHeavy'}}], matchSearchFunction=<bound method Search._xapianMatch of <MoinMoin.search.builtin.Search instance at 0xb0eebfac>>)

    1. 650 page = Page(self.request, pagename, rev=revision)
    2. 651 if not self.historysearch and revision and \
    3. 652 page.getRevList()[0] != revision:
    4. 653 continue
    5. 654 if attachment:
    • page = <MoinMoin.Page.Page object at 0xb03be26c>
    • page.getRevList = <bound method Page.getRevList of <MoinMoin.Page.Page object at 0xb03be26c>>
    • revision = 1

IndexError

list index out of range

  • args = ('list index out of range',)
  • message = 'list index out of range'

System Details

  • Date: Tue, 05 Feb 2008 17:56:10 +0000
  • Platform: Linux web11.webfaction.com 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 12 17:59:08 EDT 2007 i686
  • Python: Python 2.5 (/home/lotek/bin/python)
  • MoinMoin: Release 1.6.1 (release)
traceback.html

MoinMoin Log

    713 2008-02-05 11:56:10,230 INFO xapianSearch: query = 'Xapian::Query(Smoinmoin:(wqf=200))'
    714 2008-02-05 11:56:10,234 INFO 127.0.0.1 "GET /Index?action=fullsearch&context=180&value=moinmoin&titlesearch=Titel HTTP/1.1" 500 -
    715 2008-02-05 11:56:10,234 ERROR IndexError: list index out of range
    716 Traceback (most recent call last):
    717   File "/home2/lotek/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1283, in run
    718     handler(self.page.page_name, self)
    719   File "/home/lotek/lib/python2.5/site-packages/MoinMoin/action/fullsearch.py", line 187, in execute
    720     results = searchPages(request, query, sort, mtime, historysearch)
    721   File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/__init__.py", line 33, in searchPages
    722     historysearch=historysearch).run()
    723   File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py", line 456, in run
    724     hits = self._xapianSearch()
    725   File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py", line 553, in _xapianSearch
    726     return self._getHits(hits, self._xapianMatch)
    727   File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py", line 652, in _getHits
    728     page.getRevList()[0] != revision:
    729 IndexError: list index out of range

MoinMoin Version

1.6.1

OS and Version

Linux and Xapian 1.0.4 with PyStemmer 1.0.1

Python Version

2.5.1

Server Setup

MoinMoin Server (Standalone)

Server Details

see OS and Verison

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

DE

Workaround

Discussion

Maybe, somebody could explain this error to me? Thanks!

I just got the same error on my machine. I am running RHEL 5, Python 2.4, Xapian 1.0.4 (no PyStemmer), MoinMoin 1.6.1, all in EN. I hope this gets fixed soon! --counterpoke

(!) Thanks for the patch. I think it happens when pages that got indexed a while ago match the search query, but someone renamed or nuked the pages after the index was built - so there are no revisions there any more. -- ThomasWaldmann 2008-05-03 17:43:55

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.6.1XapianIndexErrorOutOfRange (last edited 2008-05-03 17:43:56 by ThomasWaldmann)