Open mcranston18 opened 4 years ago
I'm getting the same error when attempting to run /api/3.1/scheduled_plans/run_once
(using the scheduled_plan_run_once
method which creates & sends in the same request)
Update: mine turned out to be caused by me sending passing dashboard_id
to WriteScheduledPlan
rather than lookml_dashboard_id
just back from vacation - I'll look into it but my suspicion is that the API explorer interactive docs are sending in an ""
as the POST body while the SDK is sending in None
(or literally no body in the http payload).
@mcranston18 can you try this call to see if it works? scheduled_plan_run_once_by_id(scheduled_plan_id=1, body="")
@joeldodge79 Passing an empty string scheduled_plan_run_once_by_id(scheduled_plan_id=1, body="")
triggered the same error.
I was able to get it working by passing an empty instance of scheduled plan: scheduled_plan_run_once_by_id(scheduled_plan_id=1, body=looker_sdk.models.WriteScheduledPlan()
Is there an action we should take here @joeldodge79?
it's a bug in the controller (claims to except a blank body but then tries to call methods on nil). filed an internal ticket... I'll keep this open till that ships
Current behaviour
When I call
scheduled_plan_run_once_by_id(scheduled_plan_id=1)
, I get the following error:However, when I use the API (
/api/3.1/scheduled_plans/1/run_once
) using the same user credentials, I am able to run the scheduled plan once as expected.Expected behaviour
scheduled_plan_run_once_by_id
should succeed just by passing thescheduled_plan_id
or at least return a proper error message.Further details
I added a pdb statement in the
post
method ofapi_methods.py
. Here is the information sent in the request (with personal info removed):Version