Skip to content

Commit

Permalink
fix missmatch
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Mar 7, 2024
1 parent 1b413cd commit e9ac970
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion APSToolkitPython/src/aps_toolkit/PropReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def __init__(self, urn, token,region="US"):
}
# request
response = requests.get(URL, headers=headers)
if response.status_code != 200:
print(response.reason)
return
json_response = response.json()
children = json_response['derivatives'][0]["children"]
path = ""
Expand All @@ -67,7 +70,8 @@ def __init__(self, urn, token,region="US"):
file_bytes = response.content
downloaded_files[item] = file_bytes
else:
print("Have an error: " + str(response.reason))
print(response.reason)
return
self.ids = json.loads(codecs.decode(gzip.decompress(downloaded_files["objects_ids.json.gz"]), 'utf-8'))
self.offsets = json.loads(codecs.decode(gzip.decompress(downloaded_files["objects_offs.json.gz"]), 'utf-8'))
self.avs = json.loads(codecs.decode(gzip.decompress(downloaded_files["objects_avs.json.gz"]), 'utf-8'))
Expand Down

0 comments on commit e9ac970

Please sign in to comment.