[Xapian-discuss] Xapian 1.0 / Apache / Python problem

Richard Boulton richard at lemurconsulting.com
Fri May 25 10:03:10 BST 2007


Jason Stitt wrote:
> There's no exception and nothing in the server error logs. I figured it 
> might be a permissions issue but chmod -R 777 on the index directory 
> didn't help. Tried on two different machines so far. Yes, the index was 
> generated using 1.0.

I'm guessing that an exception is getting thrown, but not finding its 
way to the logs.  I'm not very familiar with mod_python, so I don't know 
why this might be happening, but you could try changing your code to 
something like the following to display what the exception being thrown is:

from mod_python import apache
import xapian

def handler(req):
     req.content_type = "text/html"
     req.write('Begin')

     try:
         d = xapian.Database('my/index/path')
     except xapian.Error, e:
         req.write(' %s: %s" % (e.get_type(), str(e)))
     except Exception, e:
         req.write(' %s', str(e))

     req.write(' OK')
     return apache.OK



More information about the Xapian-discuss mailing list