Handle older/unexpected etree libraries

Issue #1 new
repo owner created an issue

Some implementations of the etree API don't seem to provide 'register_namespace'... which is fair enough.

Comments (1)

  1. Anonymous

    I think I may be running into this problem. Warning I am not a developer anymore and definitely not a python developer. But I am sponsoring a SWORD2 service in Connexions (cnx.org) and trying to get a good testing environment set up.

    So -- starting on my Ubuntu laptop, I created a virtualenv and installed the sword2 client using "python setup.py install". The functional tests that try and register a namespace fail saying that "Module" doesn't have a register_namespace attribute.

    So I looked at compatible_libs.py and mimiced the imports for etree inside python and determined that my environment was using xml.etree (the 2nd option). Inside python, I could add fields to an "Entry", but got the same error when trying to register a namespace.

    So then I built lxml and tried the same thing inside python and it worked. But the functional tests still fail in exactly the same way. Which probably means I am not understanding something about the configuration and it is still getting xml.etree out there.

    Ideas? My email is kathi.fletcher at shuttleworthfoundation.org

  2. Log in to comment