This seems to be more of a python issue with character encoding, rather
than a suds issue with handling the web service. You can get the raw XML
data of that was received and interpreted by suds by calling
client.last_received() after making the service call. Although I bet that
if you fixed the unicode errors with the format of the strings of data
you're receiving, then you'll solve this bug.
I guess response.diffgram.SearchHotelResult[1] is an array of unicode
strings? And python is by default trying to make it into an ascii encoded
string in the for loop? Just guessing. But I don't think this is a suds
problem.
On Wed, Nov 27, 2013 at 7:22 PM, Tobias Ramos Rocha <tobias(a)acayaca.net>wrote:
Hello people,
i´m receiving data from a webservice and trying pass data to python
objects. Logging says that suds succeeds in receive the response from
server.
But when i try to loop the response python raises and unicode error.
here is the part where is the problem
.
.
.
response = client.service.SearchHotel(SearchHotelRequest)
hoteis = response.diffgram.SearchHotelResult[1]
for hotel in hoteis:
hotel Error in formatting: 'ascii' codec can't encode character
u'\xca' in
position 2: ordinal not in range(128)
Is there another way to extract data from response ?
Tobias
_______________________________________________
suds mailing list
suds(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/suds