Problem opening berkeley db in python

I am having problems opening berkeley db in python using bdtables. Since bdtables is used by the library that I use to access the database, I need it to work.

The problem is that the db environment I'm trying to open (I got a copy of the database to open) is version 4.4 and libdb is version 4.6. I get the following error using bsddb.dbtables.bsdTableDB ([dbname], [folder]):

(-30972, "DB_VERSION_MISMATCH: Database environment version mismatch -- Program version 4.6 doesn't match environment version 4.4")

However, bsddb.btopen ([dbname]) works.

I also tried installing db4.4-util, db4.5-util and db4.6-util. Attempting to use db4.6_verify results in:

db4.6_verify: Program version 4.6 doesn't match environment version 4.4
db4.6_verify: DB_ENV->open: DB_VERSION_MISMATCH: Database environment version mismatchs

db4.4 the execution of the results on a computer that just hangs and nothing happens.

Finally, if I run db4.4_recover in the database, this will work. However, after that I get the following error: "There is no such file or directory" in python.

+3
source share
2 answers

I think that the answers should go in the "answer" section, and not as an addendum to the question, since this poses the question of how to answer the various pages of the question list. I will do it for you, but if you get around this as well, leave a comment on my answer so that I can delete it.

Quoting the โ€œanswer questionโ€:

Checking everything in this question, I eventually solved the problem. "There is no such file or directory" caused by the absence of some __db.XXX files. Using

bsddb.dbtables.bsdTableDB([dbname],[folder], create=1)

after db4.4_recover, these files were created and now everything works.

, , . , Berkeley DB CLI, . , - stackoverflow.com

+3

, , . " " __db.XXX. bsddb.dbtables.bsdTableDB([dbname], [folder], create = 1) db4.4_recover, .

, , . , " Berkeley DB CLI, . , - stackoverflow.com

0

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


All Articles