Callback Method=query Python extension error

Is there any possible solution to what is causing the issue, even though I scheduled the query to run every 5 minutes?

Use the schedule method to run it every 5 minutes. The query method runs every minute.