File accessibilty: Unable to open file

Michela Mapelli
  • 1
  • 21 Jun '17

Dear Illustris team,

I am using the Web-based API to download star masses in sub-halos. Unfortunately, my scripts crash now and then with the following error


Traceback (most recent call last): File "findstar_halo.py", line 63, in with h5py.File(cutout,'r') as f: File "/usr/lib/python2.7/dist-packages/h5py/hl/files.py", line 207, in _init fid = make_fid(name, mode, userblock_size, fapl) File "/usr/lib/python2.7/dist-packages/h5py/_hl/files.py", line 79, in make_fid fid = h5f.open(name, h5f.ACC_RDONLY, fapl=fapl) File "h5f.pyx", line 71, in h5py.h5f.open (h5py/h5f.c:1806) IOError: unable to open file (File accessibilty: Unable to open file)


If I restart the script from where it stopped it runs just fine but usually it crashes again several minutes after. I guess this problem is related to the connection. Is there any way to avoid it?

thank you

kind regards

michela

PS: sometimes I obtain also another error with the same script: Traceback (most recent call last): File "findstar_halo.py", line 57, in cutout = get(sub_prog_url+"cutout.hdf5", cutout_request) File "findstar_halo.py", line 23, in get r.raise_for_status() File "/usr/lib/python2.7/dist-packages/requests/models.py", line 773, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error

Dylan Nelson
  • 22 Jun '17

Hi Michela,

I am not entirely sure what is inside findstar_halo.py, but the first error just seems to be that you are trying to open a file which doesn't exist. Better to first check that the file exists before you try to open it.

The second error seems be that a specific cutout request failed. In this case the raise_for_status() intentionally makes an error. Instead of this, you may want to change the script such that it waits a few seconds and then tries again.

  • Page 1 of 1