On Sat, 3 Dec 2005, Dudley Carr wrote:
On 12/3/05, Andi Vajda <[EMAIL PROTECTED]> wrote:
I think I reproduced the same problem here on OS X with 1.9.
The error is a naked 'TypeError', right ? happening in getBestFragments() ?
That's right. Not very telling, unfortunately :)
I don't know what could be causing this but I just got all PyLucene unit tests
to pass on 1.9 so I should be moving to the samples shortly.
OK, sounds good. Thanks.
The fix is simple: Add 'u' in front of the empty string, line 67 in
samples/LuceneInAction/lia/util/Streams.py such that the read() method looks
like:
def read(self, length=-1):
text = self.unicodeText
if text is None:
return u''
if length == -1 or length >= len(text):
self.unicodeText = None
return text
text = text[:length]
self.unicodeText = self.unicodeText[length:]
return text
Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev