Hey Andi (and anyone else who can give some input),

Does chandlerdb 0.7-37 work with pylucene-2.4.1 or 2.4.*? I've just
built chandlerdb against the osaf patched db, and pylucene-2.4.1 and
get the following error when running the tests:

=== Start snippet of test output ===
======================================================================
ERROR: testZlibEncrypted (tests.TestText.TestText)
----------------------------------------------------------------------
Traceback (most recent call last):
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/tests/TestText.py",
line 30, in setUp
  super(TestText, self).setUp()
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/util/RepositoryTestCase.py",
line 44, in setUp
  self._openRepository(ramdb)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/util/RepositoryTestCase.py",
line 34, in _openRepository
  self.rep.create(ramdb=self.ramdb, refcounted=True)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/DBRepository.py",
line 119, in create
  self._create(**kwds)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/DBRepository.py",
line 175, in _create
  self.store.open(**kwds)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/DBRepository.py",
line 1119, in open
  self._index.open("__index.db", txn, **kwds)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/LuceneContainer.py",
line 164, in open
  indexWriter = IndexWriter(directory, StandardAnalyzer(), True)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/LuceneContainer.py",
line 119, in deleteFile
  if self.fileContainer.fileExists(name):
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/FileContainer.py",
line 72, in fileExists
  return File(self, name).exists()
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/FileContainer.py",
line 158, in __init__
  if not self.exists():
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/FileContainer.py",
line 197, in exists
  value = self._container.get(self._key)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/DBContainer.py",
line 169, in get
  return db.get(key, self.store.txn, self.c.flags, None)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/LuceneContainer.py",
line 59, in close
  super(DbIndexOutput, self).close()
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/LuceneContainer.py",
line 70, in flushBuffer
  self.stream.write(buffer)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/FileContainer.py",
line 363, in write
  self._block.write(buffer)
 File 
"/var/tmp/portage/dev-python/chandlerdb-0.7.37/work/chandler-1.0.2/internal/chandlerdb/chandlerdb/persistence/FileContainer.py",
line 308, in write
  self._data[self._position:self._position+size] = data
TypeError: bad argument type for built-in operation

----------------------------------------------------------------------
Ran 149 tests in 98.264s

FAILED (errors=147)
=== End snippet of test output ===
Note, that *all* of the tests stop at the same point: line 308 of
FileContainer.py

I stuck the line:
print "data=%s" %data
and
print "buffer=%s" %buffer

In a variety of places where those variables are used (next to the
lines mentioned in the traceback) and I got the following:
buffer=JArray<byte>ÿÿÿù !¦¢òâ
data=JArray<byte>ÿÿÿù !¦¢òâ
or
buffer=JArray<byte>ÿÿÿù !¤dU»<
data=JArray<byte>ÿÿÿù !¤dU»<

the garbage differes from test to test, but the Jarray<byte> is always
there, leading me to believe these errors are caused by recent changes
in pylucene: (quoted form the CHANGELOG)
Version 2.4.0 -> 2.4.1
- passing strings for byte[] or char[] is no longer supported, use JArray
Version 2.3.2 -> 2.4.0
- arrays are now wrapped with JArray() instances instead of expanded into lists

However I do not know where to go from here. All I've got is guesses
and I'm not sure how to proceed or what to patch to make chandlerdb
work with pylucene 2.4.1-1 (if that really is the problem here).

Note that all tests run just fine for both pylucene and db (well, for
db, there's always a couple regression tests that don't work quite
right, but that's a case for fixing the tests, which I've not a clue
how to go about doing, not a problem with db itself.)

Thank you all so much for your help and patience with me as I work
through all of this.

Thanks,
Jacob
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to