On Tue, 13 Mar 2012, emil wrote:
> Hi, I am pretty new to whoosh. I was trying to index some documents in a
> directory. When I do commit() I get an IOError. I am displaying some
> extra outputs too to make it readable.
>
> Enter the index directory name:: myindex
> enter the source of documents:: /home/emil/workspace/python/project/
> index/documents
You supply a relative path to the index directory; and then you chdir(),
which makes that path invalid:
> os.chdir(doc_source_path)
If you have to allow entering a relative path on the command line, use
os.path.join to convert it to an absolute path before handing it to
Whoosh.
Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Future Business, Cam City FC, Milton Rd, Cambridge, CB4 1UY, UK
Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.
--
You received this message because you are subscribed to the Google Groups "Whoosh" group.
To post to this group, send email to who...@googlegroups.com.
To unsubscribe from this group, send email to whoosh+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/whoosh?hl=en.