...d JSON
I used to be able to query the the get_news_headlines() method using the below string formatting. But since this year I have been getting this error, while using the same code. I can't figure out a way to amend the query and still get the desired results.
From what I can see it seems to be encoding the backslashs in a way that makes the query unusable. It did not used to do this. Are you aware of any changes that were made that might cause this, and any solutions?
Code:
fo_all_str = "(\\\"Platts FO\\\" AND \\\"SELLS\\\" AND \\\"190\\\") OR (\\\"Platts FO\\\" AND \\\"BUYS\\\" AND \\\"190\\\") OR (\\\"Platts Marine\\\" AND \\\"SELLS\\\" AND \\\"190\\\") OR (\\\"Platts Marine\\\" AND \\\"BUYS\\\" AND \\\"190\\\")"
fo_headlines = ek.get_news_headlines(fo_all_str, count=100, date_from='2021-05-14T01:00:00', date_to='2021-06-08T23:59:00')
Full Error Message:
EikonError: Error code 500 | Backend error. Failed to deserialize backend response. Expected valid JSON. Error: invalid character 'i' looking for beginning of value