I just built the Python API for Berkeley DB XML 2.5.13. While it was pretty simple (I just had to enter "python setup.py build" and "python setup.py install" as explained in the README) I could not run any Python sample because of this error:
Traceback (most recent call last):
File "C:\dbxml-2.5.13\dbxml\examples\python\basic\helloWorld.py", line 10, in <module>
from dbxml import *
File "C:\Python26\lib\site-packages\dbxml.py", line 25, in <module>
_dbxml = swig_import_helper()
File "C:\Python26\lib\site-packages\dbxml.py", line 24, in swig_import_helper
return _mod
UnboundLocalError: local variable '_mod' referenced before assignment
As it turns out "python setup.py install" copies a few DLLs to the Python directory (C:\Python26 on my computer) but not zlib1.dll. As libdbxml25.dll depends on zlib1.dll the file must be copied manually. Then everything works fine.
The problem has been mentioned before by detonator413 (see
3831706 As it turns out it's also related to Python though.
Hope this helps anyone playing around with the Python API,
Boris