[pylucene-dev] Several problems and questions about (py)Lucene
João Rodrigues
anaryin at gmail.com
Fri Apr 18 07:13:58 PDT 2008
Hello all.
I am developing an application that uses pyLucene to index a few documents
and allow the user to perform searches on them. It is composed, basically,
of an Indexer.py script and a Searcher.py script. They run separately and my
only issue is with the Searcher.py script..
I usually work in Linux. However, my application is to be used in Windows as
well. To run my Searcher script, I have two options: if the machine's RAM is
big enough to support the index, it uses a RAMDirectory. If it isn't, it
uses an FSDirectory, and is considerably slower. To check my machine's RAM
in linux, I use the 'free -m' comand, while in windows, it's a big function:
http://pastebin.com/m3360912a
Running my script in my windows machine, with 2GB of RAM, it gives me the
following output:
* Setting up software parameters..
--- Calculating index size: 1188 MB
--- Calculating RAM memory size: 2015 MB (Windows)
Traceback (most recent call last):
File "C:\Documents and Settings\joaorodrigues\Desktop\QuExT\QuExT\Source
Code\QuExT.py", line 19, in <module>
from QE_v3 import assembly, queryExpansion
File "C:\Documents and Settings\joaorodrigues\Desktop\QuExT\QuExT\Source
Code\QE_v3.py", line 104, in <module>
lucene.initVM(lucene.CLASSPATH, maxheap='2g')
ValueError: An error occurred while creating Java VM
So, it's probably because I'm using not a "pure" python script, but the
*.exe that results of py2exe execution on my script. So, I tried to run my
script in IDLE, giving my the exact same output. So, then I thought, well,
since 2GB = 2048MB, and the script reports only 2015, that's my problem. So,
I ran the script again, but the maxheap was set to '2000m'. Well, it gave me
that output again.
The script runs beautifully on linux, performing all the tests it has to
perform, checking all parameters and actually *working* the way it should
work. So, I guess this rules out an error in my code, since the only
difference in the OS's in my script is the way the RAM is measured.
So, I'm at a dead-end (once again). I don't know what I can do, what I
should do.
Also, regarding py2exe, since I'm not sure it works perfectly with pyLucene,
can anyone tell me their experience (if any) on that matter?
Finally, how do I uninstall pyLucene in windows? I wanted to remove
completely all traces of pylucene and then install it again. Just to rule
out any "instalation" problem.
Thanks in advance, and sorry for the long rant.
João Rodrigues
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/pylucene-dev/attachments/20080418/1b0ba268/attachment.htm
More information about the pylucene-dev
mailing list