【发布时间】:2015-12-18 12:35:06
【问题描述】:
我想使用 base64.b64decode 解码我的输出,因为我的输出结果是一个实例,或者不确定来自 XML 或 SOAP,
我的“结果”是这样的:
Table =
(Table){
ResultA = "77414454-GH"
ResultB = "AB-21"
ResultC = "1.1"
}
我的脚本在这里:
print base64.b64decode(getattr(results['QueryResult']['NewDataSet']['Table'], "ResultB"))
但我总是得到这个错误:
print base64.b64decode(getattr(results['QueryResult']['NewDataSet']['Table'], "ResultB"))
File "C:\Python27\lib\base64.py", line 76, in b64decode
raise TypeError(msg)
TypeError: Incorrect padding
我已经有这个问题了,但是没有人回复我,这里是我之前的问题了解更多详情
getting specific value in <type instance>
任何建议/意见提前致谢。
【问题讨论】:
标签: python xml soap base64 decoding