[Moin-user] xapian search: an unhandled win32 exception occured in w3wp.exe

Mark Scheufele mark.scheufele at diasemi.com
Tue Apr 24 12:19:50 EDT 2012


Hi Moin Users,

I have enabled the xapian based search on our wiki system. I was able to build the index and I am also able to query the index just fine. Yet when I try to update a page I get a pop message that an unhandled win32 exception occurred in w3wp.exe (IIS).

When I look at the eventlog I can see the following error details:

Exception code: 0xc00000fd
Fault offset: 0x00019dcf
Faulting process id: 0xec
Faulting application start time: 0x01cd223181c9c430
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\python26.dll

After confirming the popup the change will be saved, yet the xapian index has not been updated (timestamp of index files did not change and searching for the change not come up with a result).

I had a look at the MoinMoin xapian events (MoinMoin\events\xapian_index.py) and found out that in case of a page update the following code is carried out:

def handle_changed(event):
    """Updates Xapian index when a page is changed"""

    request = event.request

    if request.cfg.xapian_search:
        index = _get_index(request)
        if index and index.exists():
            index.update_item(event.page.page_name)

I wrote a little script to call index.update_item(event.page.page_name). Running this script updates the xapian index yet following exception occurs:

Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored

sys.path.append("c:\moin")

from MoinMoin.web import contexts
from MoinMoin.Page import Page

class ScriptContext(contexts.AllContext):
	"""
	added REMOTE_USER to wsgi environ
	"""
	def __init__(self, user, url=None, pagename=''):
		if url is None:
			url='http://localhost:0/' # just some somehow valid dummy URL
		environ=contexts.create_environ(base_url=url) # XXX not sure about base_url, but makes "make underlay" work
		environ['HTTP_USER_AGENT']='CLI/Script'
		environ['wsgi.input']=sys.stdin
		environ['REMOTE_USER']=user
		request=contexts.Request(environ)
		super(ScriptContext, self).__init__(request)
		from MoinMoin import wsgiapp
		wsgiapp.init(self)

def _get_index(request):
	try:
		from MoinMoin.search.Xapian import XapianIndex
		return XapianIndex(request)
	except ImportError:
		pass

if __name__ == '__main__':
	request=ScriptContext("mscheufe")
	if request.cfg.xapian_search:
		index=_get_index(request)
		if index and index.exists():
			page=Page(request,"SANDBOX/fred2/test")
			index.update_item(page.page_name)

It someone could give me a hint how to get the xapian based search running on a windows system with the following spec:

- moin 1.9.3
- python 2.6.6
- xapian bindings for Python from here http://www.flax.co.uk/xapian/128/xapian-python-bindings%20for%20Python%202.4.4%20-1.2.8.win32.exe
- IIS 7.5 running moin using isapi_wsgi

Best Regards,

mark
_______________________________________________________________________________________

Dialog Semiconductor GmbH
Neue Str. 95
D-73230 Kirchheim
Managing Directors: Dr. Jalal Bagherli, Jean-Michel Richard
Chairman of the Supervisory Board: Gregorio Reyes
Commercial register: Amtsgericht Stuttgart: HRB 231181
UST-ID-Nr. DE 811121668


Legal Disclaimer: This e-mail communication (and any attachment/s) is confidential and 
contains proprietary information, some or all of which may be legally privileged. It is 
intended solely for the use of the individual or entity to which it is addressed. Access 
to this email by anyone else is unauthorized. If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.

Please consider the environment before printing this e-mail




More information about the Moin-user mailing list