[pybsddb] DBEnv open fails with DBNoSuchFileError
Yongqian Li
yongqli at 10gic.net
Mon Oct 13 10:02:40 CEST 2008
Thank you very much for your response. This has indeed fixed my
problem. I would suggest however that you add a sentence to the Python
documentation about the flags as most people would skim over the long
Oracle docs.
Sincerely,
Yongqian Li
On Mon, Oct 13, 2008 at 3:57 AM, Jesus Cea <jcea at argo.es> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yongqian Li wrote:
>> The following code fails for me:
>>
>>>>> bsddb.db.DBEnv().open('C:\\tmp\\test')
>>
>> Traceback (most recent call last):
>> File "<pyshell#3>", line 1, in <module>
>> bsddb.db.DBEnv().open('C:\\tmp\\test')
>> DBNoSuchFileError: (2, 'No such file or directory')
>>
>> I have confirmed that the directory 'C:\\tmp\\test' does exist.
>>
>> This occurs on Vista x64 as well as Ubuntu x64 with python-2.5.2
>>
>> I cannot figure out what is the problem. Please help!
>
> You need to pass a few flags to the "open" flag. Read Oracle Berkeley DB
> documentation (it is very good). For example:
> <http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_open.html>
> and the chapter about transactions:
> <http://www.oracle.com/technology/documentation/berkeley-db/db/ref/transapp/intro.html>
>
> In particular, you probably need to initialize a few subsystems, like
> DB_INIT_TXN, DB_INIT_MPOOL, DB_INIT_LOG, DB_INIT_LOCK, and do a DB_RECOVER.
>
> - --
> Jesus Cea Avion _/_/ _/_/_/ _/_/_/
> jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
> jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/
> . _/_/ _/_/ _/_/ _/_/ _/_/
> "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
> "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
> "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iQCVAwUBSPL/T5lgi5GaxT1NAQI+5gP+Pq9roCMMoi6I4uA43oAbIrAObuAswgVz
> wwWcLccaLOC7pBtJu/WPCVJ55mRNrva9VjVJb6a1aIKKhNNrzjCPxeR/OZa6BIql
> pC/rAjwQ10hGeC9XBYUXEsCkmc9fHyzYyBm6p9GNAr8Vpr8MUErSHyFLdW0NfaKg
> gFjJPAIMovI=
> =mlFs
> -----END PGP SIGNATURE-----
> _______________________________________________
> pybsddb mailing list
> pybsddb at argo.es
> http://mailman.argo.es/listinfo/pybsddb
> http://www.argo.es/~jcea/programacion/pybsddb.htm
>
More information about the pybsddb
mailing list