Hi all,

I have a problem using PyLucene from Python Server Pages using latest
mod_python 3.1.4, apache 2.0.54 and python 2.4.1.
I have searched the list archives and google for an anwer but found nothing,
maybe you can help me.

PyLucene works just fine from console python scripts (both creating and
searching the index). Trying the same in a .psp page results in a
segmentation fault as shown in apache's error.log

[Thu Sep 01 17:27:44 2005] [notice] mod_python: (Re)importing module
'mod_python.psp'
[Thu Sep 01 17:27:45 2005] [notice] child pid 21568 exit signal Segmentation
fault (11)

The PSP page I am using is the following (it crashes in the "from PyLucene
import....":

(...)

<%
import PyLucene
import sys

from PyLucene import IndexSearcher, StandardAnalyzer, QueryParser

import traceback

try:
        index_searcher = IndexSearcher("/root/doctorado/get_pages/indexes");
        q=QueryParser.parse("examen","text",StandardAnalyzer());
        hits=index_searcher.search(q)

        for i in range(hits.length()):
                print str(hits.doc(i).get("url"));

        index_searcher.close();
except:

        index_searcher.close();
        traceback.print_exc()
        sys.exc_info()

%>

(...)

I have used mod_python 3.1.4 for python 2.4 ubuntu package, and compiled
myself latest version of mod_python without success.

I really don't know what else can I do to make it work.

Any idea/help would be greatly appreciated.

Thanks,


        Jose Ignacio Sanchez Martin

_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to