Yesterday, I would very occasionally get the following error when requesting a subhalo (for z=0, Illustris-3) via:
subhalo = get( subhalos["results"][ind]["url"] )
The error was:
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
That was not a big deal; since it happened infrequently, I just put that get inside of a try/except block
I am now getting the same error for every cutout I request (again, z=0, Illustris-3). I have the following short python script running which has printed "ConnectionError" for every subhalo it has yet tried:
r = requests.get(path, params=None, headers = HEADERS)
print("path %s was a success!" % path)
except requests.ConnectionError:
print("ConnectionError")
Is there something wrong in how I am requesting the cutout? I was able to request cutouts okay about a month ago (not using precisely the same code though).
Ryan Farber
11 Aug '16
Dylan Nelson said it was a filesystem problem. In any case, this is working now.
Yesterday, I would very occasionally get the following error when requesting a subhalo (for z=0, Illustris-3) via:
subhalo = get( subhalos["results"][ind]["url"] )
The error was:
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
That was not a big deal; since it happened infrequently, I just put that get inside of a try/except block
I am now getting the same error for every cutout I request (again, z=0, Illustris-3). I have the following short python script running which has printed "ConnectionError" for every subhalo it has yet tried:
import requests
BASE = "http://www.illustris-project.org/api/Illustris-3/" + \ "snapshots/135/subhalos/"
EXT = "/cutout.hdf5"
HEADERS = {"api-key":"dfcf155772ea55da557a2c79355d99e2"}
for i in xrange(int(1e6)):
path = BASE + str(i) + EXT
try:
except requests.ConnectionError:
Is there something wrong in how I am requesting the cutout? I was able to request cutouts okay about a month ago (not using precisely the same code though).
Dylan Nelson said it was a filesystem problem. In any case, this is working now.