Bsddb 4.2.52 DBInvalidArgError 22 Invalid argument

I am just trying to open open in Python using bsddb, but encountering the following error. Any ideas? If not, is there a way to get a more detailed error message for debugging, getting more information will probably help me figure it out a bit. The error code without special details, of course, does not help much.

DBInvalidArgError: (22, 'Invalid argument')

A source:

import bsddb, bsddb.db ... try: e = bsddb.db.DBEnv() e.open('/mydir', bsddb.db.DB_CREATE | bsddb.db.DB_INIT_MPOOL) ... 

Additional Information: In / mydir I have a DB_CONFIG file:

 set_data_dir /mydir/current_data # 128MB set_cachesize 0 134217728 1 

Update: I think I'm here because it has something to do with the bsddb and 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/') > 

There are no errors if I launched it using python2.6.

+1
source share
1 answer

Yes, BerkeleyDB is used to return EINVAL to version mismatch.

A later (e.g. last 5+ years) BerkeleyDB instead returns DB_VERSION_MISMATCH.

0
source

Source: https://habr.com/ru/post/945647/


All Articles