500 Server Error when trying to access black hole particle information

Murti Nauth
  • 4
  • 7 Jun '19

I'm getting an error that states: requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR. I'm using tasks 1 and 11 from the API documentation to get black hole IDs, Masses, and Coordinates. The code looks like this, a copy of the documentation's code:

import requests

baseUrl = 'http://www.ilustris-project.org/api/'
headers = {"api-key":""}

 def get(path, params=None):

    r = requests.get(path, params=params, headers=headers)

    # raise exception if response code is not HTTP SUCCESS (200)
    r.raise_for_status()

    if r.headers['content-type'] == 'application/json':
        return r.json() # parse json responses automatically

    return r

 def snapshot(snap_number):

    base_url = "http://www.illustris-project.org/api/Illustris-1/"
    sim_metadata= get(base_url)

    params = {'bhs':'ParticleIDs,Coordinates,Masses'}

    for i in range(sim_metadata['num_files_snapshot']):
        file_url = base_url + "files/snapshot-" + str(snap_number) + "." + str(i) + ".hdf5"
        saved_filename = get(file_url, params)
    print(saved_filename)

snapshot_number = 133  
snapshot(snapshot_number)
Dylan Nelson
  • 8 Jun '19

Hi Murti,

I think you are just running into instability on our filesystems on www.illustris-project.org, we have been having some trouble here. I am working on getting this more stable again.

In the meantime, I suggest to simply switch to www.tng-project.org, where everything works much better. The original Illustris-1 data is also available here.

In particular, the following link works for me, and this (in a loop) should allow you to download the data you're after:

http://www.tng-project.org/api/Illustris-1/files/snapshot-133.0.hdf5?bhs=ParticleIDs,Coordinates,Masses
Murti Nauth
  • 10 Jun '19

Hi Dylan,

Thank you very much! The link works well for what I need.

  • Page 1 of 1