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 https://www.tng-project.org/data/docs/api/. However after, say 50 or 100ish galaxies the code breaks down with the error
ConnectionResetError: [Errno 54] Connection reset by peer
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Could you help me to understand what's the problem?
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.
Thank you for your superquick reply. I will try as you suggest.