19 January 2010 5 comments Python
This cost me some hair-pulling today as I was trying to write a custom test runner for a Django project I'm working on that creates a test Xapian database just for running the tests. Basically, you can't do this:
Because if you do you end up getting these strange DatabaseOpeningError exceptions. So, here's how you do it:
import xapian xapian.WritableDatabase(database_file_path, xapian.DB_CREATE_OR_OPEN)
Hopefully by blogging about this some other poor coder will save some time.