[Biopython-dev] Bio.Entrez batch download example with retries

Peter Cock p.j.a.cock at googlemail.com
Wed Nov 26 10:11:46 UTC 2014


On Wed, Nov 26, 2014 at 1:37 AM, Vincent Davis <vincent at vincentdavis.net> wrote:
>
> On Tue, Nov 25, 2014 at 7:56 AM, Peter Cock <p.j.a.cock at googlemail.com>
> wrote:
>>
>> Would anyone like to contribute an example script using Bio.Entrez
>> with try/except handling of intermittent network errors like:
>>
>>  - HTTP Error 500: Internal Server Error
>>  - HTTP Error 502: Bad Gateway
>
>
> Are there other errors that would benefit
> from the pause
> /
> retry?
> Like...
> 408: ('Request Timeout', 'Request timed out; try again later.')
> 503: ('Service Unavailable', 'The server cannot process the request due to a
> high load')
> 504: ('Gateway Timeout', 'The gateway server did not receive a timely
> response')
>
> Vincent Davis

I would say any 5xx error was worth a retry.

On the other hand, 4xx errors are probably our problem.

Peter


More information about the Biopython-dev mailing list