You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm new to Zeep, and I am updating some legacy code that is using it. I have found that the parsed Zeep dictionaries differ significantly from the raw XML response. Unfortunately, I cannot post the data here because it is sensitive. But I can post the code. The code is the same as the one for the other issue I have posted, but the problem is different. I understand that this is likely difficult to debug, but perhaps just from seeing my code you can tell that I am doing something wrong?
Zeep version is 4.2.1, Python 3.10.9.
Zeep seems to occasionally fail to find attribites inside of nested XML. Specifically, there seems to be a problem with the XML element project in below.
In my test, this happened to ~10 out of 300 user queries that I did. The raw XML for those users contained the information as shown above, same as for other users. The parsed dictionary key for project contained a whole bunch of extra key-value pairs that are not part of XML (see my other issue), but did not contain the fields classname and id for those users. Again, this script works for most users. Further, I have tried SUDS with the same query, and this specific query works for all users, so it is unlikely to be a problem of the raw XML.
I would appreciate any advices. Below I show my code
I use the following to obtain the raw XML and the parsed data, by changing the raw_response flag.
client = zeep.Client(wsdl)
with client.settings(strict=False, raw_response=raw_response):
ret = client.service.read(query)
For raw response, I extract ret.content.
For parsed response, I convert everything to dictionaries via
Hi, I'm new to Zeep, and I am updating some legacy code that is using it. I have found that the parsed Zeep dictionaries differ significantly from the raw XML response. Unfortunately, I cannot post the data here because it is sensitive. But I can post the code. The code is the same as the one for the other issue I have posted, but the problem is different. I understand that this is likely difficult to debug, but perhaps just from seeing my code you can tell that I am doing something wrong?
Zeep version is 4.2.1, Python 3.10.9.
Zeep seems to occasionally fail to find attribites inside of nested XML. Specifically, there seems to be a problem with the XML element
project
in below.<user classname="user" id="5"> <active>true</active> <project classname="project" id="12345"/> <order projectid="12345" classname="order" id="3"/> ...
In my test, this happened to ~10 out of 300 user queries that I did. The raw XML for those users contained the information as shown above, same as for other users. The parsed dictionary key for project contained a whole bunch of extra key-value pairs that are not part of XML (see my other issue), but did not contain the fields
classname
andid
for those users. Again, this script works for most users. Further, I have tried SUDS with the same query, and this specific query works for all users, so it is unlikely to be a problem of the raw XML.I would appreciate any advices. Below I show my code
I use the following to obtain the raw XML and the parsed data, by changing the raw_response flag.
For raw response, I extract
ret.content
.For parsed response, I convert everything to dictionaries via
The text was updated successfully, but these errors were encountered: