我正在尝试阅读此 Soap API http://telemetriaws1.ana.gov.br/ServiceANA.asmx?WSDL。当我尝试调用DadosHidrometeorologicosGerais
函数时,出现此错误:
File "/home/1234/.local/share/virtualenvs/data_getter-1W9NAele/lib/python3.6/site-packages/zeep/xsd/schema.py", line 570, in _get_component
return items[qname]
KeyError: <lxml.etree.QName object at 0x7f2e93fa6d00>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
zeep.exceptions.LookupError: No element 'DocumentElement' in namespace None. Available elements are: NewDataSet
所有其他功能工作正常。
这是我的代码:
from zeep import Client
client = Client('http://telemetriaws1.ana.gov.br/ServiceANA.asmx?WSDL')
client.service.DadosHidrometeorologicosGerais(codEstacao='86450500', dataInicio='05/05/2018', dataFim='05/05/2018')