2012-11-15 27 views
0

我在使用PyXB为WSDL文件创建python绑定时遇到了问题。我做的:PyXB says AttributeError:'module'object

我得到 “AttributeError的: '模块' 对象有没有属性 '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' 
+0

您能否包含* full * traceback? –

+0

thx,我添加了堆栈跟踪。 –

回答

0

原来, “AttributeError的: '模块' 对象...” 是一个预期的错误。我在源代码中发现此注释,其中发生错误:-)

       # 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. 
相关问题