d3QUone / aiosqs

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

Fix parsing different source formats #3

Closed d3QUone closed 1 year ago

d3QUone commented 1 year ago
Traceback (most recent call last):
  File "/Users/vladimirkasatkin/Developer/aiosqs/aiosqs/tests/test_receive_message.py", line 36, in test_parse_oneline_xml
    res = parse_xml_result_response(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vladimirkasatkin/Developer/aiosqs/aiosqs/parser.py", line 78, in parse_xml_result_response
    elements = collect_elements(root=root, xpath=xpath)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vladimirkasatkin/Developer/aiosqs/aiosqs/parser.py", line 27, in collect_elements
    value = elem.text.strip()
            ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strip'