Python Zeep客户端请求在xml异常中抛出错误

问题描述:

当我运行以下代码时,我不断收到以下错误:here is an error in XML document (113, 25). ---> The string '' is not a valid Boolean value.我不明白为什么会发生这种情况。 Here是文档,根据它,布尔字段不是必需的。Python Zeep客户端请求在xml异常中抛出错误

from zeep import Client 

client = Client('http://services.resumeparsing.com/ResumeService.asmx?wsdl') 
response = client.service.ParseResume(request={'AccountId': 'XXXXXXX',\ 
    'ServiceKey':'XXXXXXXXX',\ 
    'FileBytes': file_bytes, 'FileText': file_text, \ 
    }) 
print(response) 

任何帮助将不胜感激!

zeep的作者在这里;你使用的是哪个版本?看来zeep会根据服务器生成无效的XML。

可以看到哪些XML通过启用调试日志级别发送,请参阅http://docs.python-zeep.org/en/latest/transport.html#debugging

+0

的'zeep.transports'模块帮我解决这个问题。谢谢! –