I am simply trying to call open in Python using bsddb but running into the following error. Any idea? If not, is there a way to get a more detailed error message for debugging, getting more info can probably help me investigate a little further. An error code without much details certainly doesn't help much.
DBInvalidArgError: (22, 'Invalid argument')
Source:
import bsddb, bsddb.db
...
try:
e = bsddb.db.DBEnv()
e.open('/mydir', bsddb.db.DB_CREATE | bsddb.db.DB_INIT_MPOOL)
...
Additional info: In /mydir I have a DB_CONFIG file:
set_data_dir /mydir/current_data
# 128MB
set_cachesize 0 134217728 1
Update: I think I am onto something here as it has something to do with bsddb & bsddb.db versions:
> $python
> Python 2.5...
> import bsddb, bsddb.db
> print bsddb.__version__, bsddb.db.version()
> 4.4.5 (4, 2, 52)
> bsddb.db.DBEnv().open('/mydir/')
> bsddb.db.DBInvalidArgError: (22, 'Invalid argument')
> $python2.6
> Python 2.6.6...
> import bsddb, bsddb.db
> print bsddb.__version__, bsddb.db.version()
> 4.7.3 (4, 7, 25)
> bsddb.db.DBEnv().open('/mydir/')
>
No errors if I run it with python2.6.