Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Python API setup problem on Windows

707995Oct 26 2009 — edited Nov 2 2009
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2009
Added on Oct 26 2009
2 comments
4,177 views