Accessing Cached Query Results (Invalid Date)

Hi All,

I’ve been attempting to set up a Python script to access and refresh a daily query using the api. I’ve run into an issue where the query doesn’t work for some queries and does for others. When it doesn’t I get redirected to this message:

“No cached result found for this query. You have requested this URI [/api/queries/491/results.csv] but did you mean /api/query_results or /api/queries/<query_id>/refresh or /api/query_results/<query_result_id> ?”

For the queries that don’t work, I also see on the query explorer that there is an “invalid date” in the last execution column. The queries are scheduled to, and successfully, run every day. The query results are available to a browser, but seem to not be cached for access by the api in these cases. I’ve not been able to understand why certain queries are affected by this and others are not.

Does anyone have an idea what is going on here and how I can make these queries available to the api? To be clear, the Python script doesn’t seem to be the problem - as queries that are not affected by this issue can be accessed successfully.


Do the queries with this error use Parameters?

In the case of the queries I am trying to access: yes, they do. Nearly all of our queries have parameters, however, and the invalid date error seems to indiscriminately affect those with and without them. There are also scheduled queries that run successfully with parameters, so I’m not sure if/how they are related.