推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
liwenbest
V2EX  ›  Python

Python soap client 使用 suds 错误:suds.TypeNotFound: Type not found: 'faultcode',如何修复

  •  
  •   liwenbest · Jan 8, 2020 · 3029 views
    This topic created in 2319 days ago, the information mentioned may be changed or developed.

    请教各位大佬,使用 suds 请求 wdsl 接口数据时候, import suds from xml.sax.saxutils import escape from suds.client import Client

    Schema:0x7f075b7e6c18 (raw) <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://ws.webservice.les.com/"> <xsd:element name="Exception" type="tns:Exception"/> <xsd:complexType name="Exception"> xsd:sequence <xsd:element minOccurs="0" name="message" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:schema> (model) <Element:0x7f075b7e6c50 name="Exception" type="('Exception', 'http://ws.webservice.les.com/')" /> <Complex:0x7f075b7e6c88 name="Exception"> Sequence:0x7f075b7e6cf8 <Element:0x7f075b7e6d68 name="message" type="('string', 'http://www.w3.org/2001/XMLSchema')" />

    <suds.sax.document.Document object at 0x7f075b7f2f60> Traceback (most recent call last): File "hn_wdsl.py", line 145, in <module> a.get_lyts() File "hn_wdsl.py", line 49, in get_lyts result = client.service.queryLyts(startRow =0, pageSize=10,status='已办结',tsDate ='2018-01-01') File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/client.py", line 521, in call File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/client.py", line 581, in invoke File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/client.py", line 621, in send File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/client.py", line 685, in process_reply File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/bindings/binding.py", line 147, in get_reply File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/umx/typed.py", line 66, in process File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/umx/core.py", line 46, in process File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/umx/core.py", line 61, in append File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/umx/core.py", line 138, in append_children File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/umx/core.py", line 59, in append File "/root/anaconda3/lib/python3.6/site-packages/suds_jurko-0.6-py3.6.egg/suds/umx/typed.py", line 80, in start suds.TypeNotFound: Type not found: 'faultcode'</module>

    出现这个问题 如何解决

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   927 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 20:02 · PVG 04:02 · LAX 13:02 · JFK 16:02
    ♥ Do have faith in what you're doing.