dbhash on win and on cygwin not compatible ?

Andrew MacIntyre andymac at bullseye.apana.org.au
Wed May 14 18:25:26 EDT 2003


On 14 May 2003, Rony wrote:

> ActivePython 2.2.2 Build 224 (ActiveState Corp.) based on
> Is there a difference between the two that causes my problem ?
> Same python version for both
>
> Python 2.2.2 (#37, Nov 26 2002, 10:24:37) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import dbhash
> >>> dbhash.open('reception.db')
> <bsddb.bsddb object at 0x0087BE08>
> >>>
>
>
> Python 2.2.2 (#1, Mar  9 2003, 08:18:26)
> [GCC 3.2 20020927 (prerelease)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import dbhash
> >>> dbhash.open('reception.db')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.2/dbhash.py", line 16, in open
>     return bsddb.hashopen(file, flag, mode)
> bsddb.error: (22, 'Invalid argument')
> >>>
>
> Thanks for an hints to solve this problem.

Your MSVC & Cygwin bsddb modules are linked against different versions of
the BSDDB library.

I believe the MSVC version is against DB v1.85.  The Cgywin version is
probably against DB v3.0 or later.

Solutions:
- install PyBSDDB3 (which uses DB v3.0 or later) on both [MSVC binaries
  available on SF, and should be buildable with Cygwin]

- find a copy of DB v2.7.7 for Cygwin, and rebuild bsddb (this DB version
  can read the old files in the compatibility mode used by the bsddb
  module).

- wait for 2.3, which makes PyBSDDB3 part of the Python standard library,
  and takes over the bsddb compatibility interface.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  | Snail: PO Box 370
        andymac at pcug.org.au            |        Belconnen  ACT  2616
Web:    http://www.andymac.org/        |        Australia






More information about the Python-list mailing list