#πŸ”’ Api Response 200 but the query stills running how to try and except

6 messages Β· Page 1 of 1 (latest)

still pumice
#

Hi! I'm using a API that runs a query and sometimes the api finish the query and sends the data,but when the api stills running I want to wait or chech the query, I can get the response['data']['status] == 'Running', is there a way how to use these in a try and except?

exotic terraceBOT
#

@still pumice

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

midnight marsh
#

I'm not familiar with these technologies... though if you are getting the status and you know the status of running versus completed, couldn't you just use a while True, then break when you have the desired status? Could link it to whatever async thing you are probs doing. Probs more appropriate compared to a try except.

still pumice
#

So far I did an if else, but maybe writting a function that takes care of these

exotic terraceBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.