d3QUone / aiosqs

Python asynchronous and lightweight AWS SQS client.
https://pypi.org/project/aiosqs/
MIT License
12 stars 0 forks source link

unhandled NameSpace in AWS response #14

Closed xZanon closed 11 months ago

xZanon commented 11 months ago

Problem with parsing xml respond from AWS that contains namespace.

Current response from AWS looks like : <GetQueueUrlResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"> <GetQueueUrlResult> <QueueUrl> https://sqs.....</QueueUrl> </GetQueueUrlResult>

and the parser does not xpath it correctly.

Quick and dirty solution - remove 'xmlns' from response body in file : parser.py, function : parse_xml_result_response() something like body = re.sub(r' xmlns=".*"','', body)

The other way is to handle NameSpaces by lxml or start using different library

Regards ,

d3QUone commented 11 months ago

Hi @xZanon, thank you for your report! Confirming, there is a bug, I'll work on a proper fix soon.