2012-11-15 28 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. 
相關問題