PyXB说AttributeError:'module'obj

2024-10-01 02:34:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我在使用PyXB为WSDL文件创建python绑定时遇到问题。我知道:

我得到“AttributeError:'module'object没有属性'CreateFromDOM'”并且没有生成代码。对于另一个WSDL文档,我得到了相同的错误。在

有人能给我个线索吗? 谢谢!在

完整堆栈跟踪:

ERROR: Unable to convert DOM node {http://www.w3.org/2001/XMLSchema}schema to Python instance
Traceback (most recent call last):
  File "/home/boehlke/.virtualenvs/env/local/lib/python2.7/site-packages/pyxb/binding/basis.py", line 2047, in append
    value = mr.module().CreateFromDOM(node)
AttributeError: 'module' object has no attribute 'CreateFromDOM'

Tags: installpipto版本nodeobjectwsdlattributeerror
1条回答
网友
1楼 · 发布于 2024-10-01 02:34:55

结果发现,“AttributeError:'module'object…”是一个预期的错误。我在源代码中找到了这个注释,错误发生在这里:-)

                                # The module holding XMLSchema bindings
                                # does not have a CreateFromDOM method,
                                # and shouldn't since we need to convert
                                # schema instances to DOM more carefully.
                                # Other namespaces won't have a module if
                                # the bindings were not imported; this is
                                # probably worth a warning.

相关问题 更多 >