I don't get why you open the XML file binary. I get string handling error if I do it so. Bu I have another problem. I open the xml file like this replacelist = [("$pool_cust_lic_pool$", "{0}".format(customer_pool_name))] with open(DASHBOARD_FILE, 'r') as XMLfile: XMLDashboard = XMLfile.read().replace('\n', '') for replacement in replacelist: XMLDashboard = XMLDashboard.replace(replacement[0], replacement[1]) r = requests.get(SPLUNKURL, auth=(SPLUNKUSER, SPLUNKPS), params={'input-dashboard-xml': XMLDashboard, 'paper-size': 'a4-landscape'}, verify=False) part of the dashboard content: <query> foreach "License-pool size in GB" [eval val2='<<FIELD>>'] <query> #query is shorted. Since I have << and >> in my dashboard xml. I get the following error.</query> An error occured creating weekly reporting for pool auto_generated_pool_download-trial for cw 5 400 Unable to render PDF.<br/><ul><li>Bailing out of Integrated PDF Generation. Exception raised while preparing to render "Untitled" to PDF. StartTag: invalid element name, line 1, column 3533 (<string>, line 1)</li></ul> The column 3533 indicate the line <<FIELD>> in the dashboard xml. The dashboard works fine. I can request and convert it in pdf via curl curl -X POST -u admin:Changeme1 -k 'https://localhost:8089/services/pdfgen/render?input-dashboard='license_test' &namespace=search &paper-size=a4-landscape' > test.pdf but it doesn't work via my python script
... View more