V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2020-01-08 18:40:12 +08:00 · 2284 次点击
    这是一个创建于 1787 天前的主题,其中的信息可能已经有所发展或是发生改变。

    请教各位大佬,使用 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>

    出现这个问题 如何解决

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2854 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 12:38 · PVG 20:38 · LAX 04:38 · JFK 07:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.