You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When iterating through BWQueries.iter_mentions() there's no way to keep track of current page, retry or skip a page that yields an error. What's more, internal server errors remain uncaught - there's error key in the response, but the code looks for errors: https://github.com/BrandwatchLtd/bcr-api/blob/master/src/bcr_api/bwdata.py#L993
The text was updated successfully, but these errors were encountered:
I've worked around this by dynamically patching the BWUser.request method, with a version decorated using https://pypi.org/project/retry/
So, one approach to solving this is to add the retries there (although the decorator won't skip a failed page, just retry until it gives up and raises). The problem is you have to decide what parameters to give to retry(), and different users might have different needs. I don't know whether everyone else is on the same API rate limit that my account is, for example, so the numbers I used might not be appropriate in general.
When iterating through
BWQueries.iter_mentions()
there's no way to keep track of current page, retry or skip a page that yields an error. What's more, internal server errors remain uncaught - there'serror
key in the response, but the code looks forerrors
: https://github.com/BrandwatchLtd/bcr-api/blob/master/src/bcr_api/bwdata.py#L993The text was updated successfully, but these errors were encountered: