apify-client-python icon indicating copy to clipboard operation
apify-client-python copied to clipboard

No Endpoint for RunsClient.abort()

Open Hardik7843 opened this issue 9 months ago • 2 comments

I am trying to run an actor for multiple times. the problem is that I don't want the scrapper to run more than 60 seconds. if running abort the run and return dataset.

apify_client = ApifyClient(client_id)
task = apify_client.task(task_id)

start = time.time()
task.call(wait_secs = 30)
end = time.time()
print(f"Run finished in : {end - start}")

last_run  = task.last_run(status='RUNNING' , origin = 'API')

aborted_info = last_run.abort() 

The error message says there is no end-point for abort. apify_client._errors.ApifyApiError: We have bad news: there is no API endpoint at this URL. Did you specify it correctly?

Hardik7843 avatar May 08 '24 18:05 Hardik7843