---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-6-a59052999c52> in <module>()
7 for lon in lon_all:
8 for lat in lat_all:
----> 9 temp = get_temperature(lon, lat) - 273.15
10 plt.scatter(lon, lat, c=temp, s=100, vmin=-4., vmax=30.)
11
<ipython-input-4-70a2f60a8b1e> in get_temperature(lon, lat)
6 def get_temperature(lon, lat):
7 data = requests.get(BASE_URL, params={'lon': lon, 'lat':lat}).json()
----> 8 return data[u'main'][u'temp']
9
10
KeyError: 'main'