requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

Claudia Pulsoni
  • 1
  • 19 Dec '22


I am trying to use the API to walk down the SubLink descendant/progenitor links for something like ~300 galaxies with a code very similar to task 9 in However after, say 50 or 100ish galaxies the code breaks down with the error

ConnectionResetError: [Errno 54] Connection reset by peer

or sometimes

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Could you help me to understand what's the problem?
Thank you!

Dylan Nelson
  • 20 Dec '22

Hi Claudia,

I cannot be sure, if you really want to use such an approach, one idea would be to catch and handle any possible exception, repeating requests when necessary, in order to guarantee eventual success.

However, I would suggest that it would be much easier to simply download the merger tree, or the MPB, or the MDB, of the subhalo of interest, then analyze it as you like. These are available e.g. as sublink/full.hdf5 for a given subhalo.

Claudia Pulsoni
  • 20 Dec '22

Hello Dylan,
Thank you for your superquick reply. I will try as you suggest.

  • Page 1 of 1