# Make list to collect order UIDs
order_uids = []
for index, row in coordinates.iterrows():
# Build request URL
requestURL = url + row['product'] + "/subsetOrder?latitude=" + str(row['latitude']) + "&longitude=" + str(row['longitude']) + "&email=" + row['email'] + "&uid=" + row['site_id'] + "&startDate=" + row['start_MODIS_date'] + "&endDate=" + row['end_MODIS_date'] + "&kmAboveBelow=" + str(row['kmAboveBelow']) + "&kmLeftRight=" + str(row['kmLeftRight'])
# Submit request
response = requests.get(requestURL, headers=header)
# Append UID to list
order_uids.append(json.loads(response.text)['order_id'])
print(order_uids)
为什么会出现此错误
KeyError Traceback (most recent call last)
<ipython-input-4-d66059bfd6b6> in <module>()
10
11 # Append UID to list
---> 12 order_uids.append(json.loads(response.text)['order_id'])
13
14 print(order_uids)
KeyError: 'order_id'