> On Aug 9, 2024, at 02:54, Marshall, Chris <c.marsh...@city.ac.uk> wrote: > > > Hi Andy, > > Do you think using a new version of python might fix it?
Two things: - the sample code is out of date, it needs to be refreshed - the code in unit tests is correct, it can be used as examples for refreshing the samples - please subscribe to the pylucene-dev list by following the instructions here: https://lucene.apache.org/pylucene/mailing-lists.html Andi.. > > C > From: Macfarlane, Andrew <a.macfarlan...@city.ac.uk> > Sent: 09 August 2024 10:46 > To: pylucene-dev-ow...@lucene.apache.org > <pylucene-dev-ow...@lucene.apache.org> > Cc: Marshall, Chris <c.marsh...@city.ac.uk> > Subject: Problems with IndexFiles.py > > Hi > > I’m trying to get pylucene working, with IndexFiles.py example, but I’m > running into problems. > > The following code has been deprecated: > > store = SimpleFSDirectory(Paths.get(storeDir)) > > I’ve therefore changed the code to > > store = FSDirectory(Paths.get(storeDir)) > > but I get these errors when I try to run it with python > > andym@pevensey:~/PYTHON$ ./IndexFile.py CORPUS/ > org.apache.lucene.store.MemorySegmentIndexInputProvider <init> > INFO: Using MemorySegmentIndexInput with Java 21 or later; to disable start > with -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false > lucene 9.10.0 > Failed to open directory: ('instantiating java class', <class > 'org.apache.lucene.store.FSDirectory'>) > Failed: ('instantiating java class', <class > 'org.apache.lucene.store.FSDirectory'>) > Traceback (most recent call last): > File "./IndexFile.py", line 112, in <module> > raise e > File "./IndexFile.py", line 106, in <module> > IndexFiles(sys.argv[1], os.path.join(base_dir, INDEX_DIR), > File "./IndexFile.py", line 50, in __init__ > raise e > File "./IndexFile.py", line 47, in __init__ > store = FSDirectory(Paths.get(storeDir)) > NotImplementedError: ('instantiating java class', <class > 'org.apache.lucene.store.FSDirectory'>) > > The python version is: Python 3.8.10, pylucene is: pylucene-9.10.0 > > Note that I’m using the current version of the example from here: > > https://svn.apache.org/viewvc/lucene/pylucene/trunk/samples/IndexFiles.py?view=markup&pathrev=1896677 > > I hope you can help me with this problem, > > Cheers > Andy > > -------------------------------------------------- > > >