500 error for SubLink_gal on TNG100-1

Prem Kumar
  • 1
  • 24 Feb

Hi Dylan,

There is issue while downloading files (like cutouts and sublinkgal etc) for TNG100 using API. The error I am getting is as follows:

---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
Cell In[22], line 1
----> 1 getTree(tngType, baseSnapshot, baseSubhaloIDs[1], onlyMDB =True)

File /pkumar/TNGDynamics/API_functions.py:158, in getTree(tngType, snapNum, subhaloId, treeType, onlyMPB, onlyMDB)
    155 else:
    156     url = f"http://www.tng-project.org/api/{tngType}/snapshots/{snapNum}/subhalos/{subhaloId}/{treeType}/full.hdf5"
--> 158 saved_filename = get(url, save_path=savingPath)
    159 return saved_filename

File /pkumar/TNGDynamics/API_functions.py:17, in get(path, params, save_path)
     14 r = requests.get(path, params=params, headers=headers)
     16 # Raise exception if response code is not HTTP SUCCESS (200)
---> 17 r.raise_for_status()
     19 if r.headers['content-type'] == 'application/json':
     20     return r.json()  # Parse json responses automatically

File 23/lib/python3.11/site-packages/requests/models.py:1021, in Response.raise_for_status(self)
   1016     http_error_msg = (
   1017         f"{self.status_code} Server Error: {reason} for url: {self.url}"
   1018     )
   1020 if http_error_msg:
-> 1021     raise HTTPError(http_error_msg, response=self)

HTTPError: 500 Server Error: Internal Server Error for url: https://data-eu.tng-project.org/tree/sublinkgal_mdb/L75n1820TNG/50/4/hdf5/?token=b3671cd170de9fa1062f

Here, getTree(tngType, baseSnapshot, baseSubhaloIDs[1], onlyMDB =True) is my function that downloads the tree data.

Dylan Nelson
  • 1
  • 24 Feb

Thanks for the report, some SubLink_gal files were missing for TNG50-3 and TNG100-1.

API link for test: http://www.tng-project.org/api/TNG100-1/snapshots/50/subhalos/4/sublink_gal/mpb.hdf5

This should now be working - please try again, and post back if you still have problems.

Prem Kumar
  • 25 Feb

Hi Dylan, now it's working fine. Thanks.

  • Page 1 of 1