Jump to content

API Problem - HTTP XML response Is not parsable


Recommended Posts

I call the API via URL as indicated in this documentation.


https: //[email protected]/api/

Everything works correctly

While if I call the API through this code in PYTHON I get an error that says: HTTP XML response Is not parsable

from prestapyt import PrestaShopWebService
from xml.etree import ElementTree

def return_order(order):

    prestashop = PrestaShopWebService('https://xxxxxxxxxxx.com/api', '6J2QUZ8WJANVWAINCJ1F15HGX9ZW8U2Z')
    order_prestashop = ElementTree.tostring(prestashop.get('orders/%s' % (order))).decode()
    order_prestashop = ElementTree.fromstring(order_prestashop)
    return order_prestashop

How can I solve?


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...