python-amazon-sp-api icon indicating copy to clipboard operation
python-amazon-sp-api copied to clipboard

`get_feed_result_document` Incorrectly parses `\n` and `\t`

Open Faithfinder opened this issue 1 year ago • 0 comments

Describe the bug The result of get_feed_result_document incorrectly contains literal \n and \t instead of actual new lines and tabs

To Reproduce

Steps to reproduce the behavior: print/write to file get_feed_result_document

Expected behavior No garbage symbols in response

Desktop (please complete the following information):

  • OS: Linux

Additional context

Message is

<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">\n\t<Header>\n\t\t<DocumentVersion>1.02</DocumentVersion>\n\t\t<MerchantIdentifier>XXXXXXX</MerchantIdentifier>\n\t</Header>\n\t<MessageType>ProcessingReport</MessageType>\n\t<Message>\n\t\t<MessageID>1</MessageID>\n\t\t<ProcessingReport>\n\t\t\t<DocumentTransactionID>2105848019838</DocumentTransactionID>\n\t\t\t<StatusCode>Complete</StatusCode>\n\t\t\t<ProcessingSummary MarketplaceName="www.amazon.com">\n\t\t\t\t<MessagesProcessed>1</MessagesProcessed>\n\t\t\t\t<MessagesSuccessful>1</MessagesSuccessful>\n\t\t\t\t<MessagesWithError>0</MessagesWithError>\n\t\t\t\t<MessagesWithWarning>0</MessagesWithWarning>\n\t\t\t</ProcessingSummary>\n\t\t</ProcessingReport>\n\t</Message>\n</AmazonEnvelope>

Sorry this is not a PR, I'm very new to both SP API and Python and am a bit confused at which point this happens. Seems like an easy fix

Faithfinder avatar Apr 25 '24 16:04 Faithfinder