<type 'exceptions.KeyError'> | Python 2.7.12: /uufs/chpc.utah.edu/sys/installdir/anaconda/4.2.0/bin/python Thu Jan 2 22:49:07 2025 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/uufs/chpc.utah.edu/common/home/u0553130/public_html/Brian_Blaylock/cgi-bin/mesowest_current.cgi in |
36 from BB_wx_calcs.humidity import Tempdwpt_to_RH |
37 |
=> 38 a = get_mesowest_latest(STN, tz=TZ, units=UNITS) |
39 |
40 sectors = np.arange(22.5, 361, 45) |
a undefined, get_mesowest_latest = <function get_mesowest_latest>, STN = 'NAA', tz undefined, TZ = 'Local', units undefined, UNITS = 'English' |
/uufs/chpc.utah.edu/common/home/u0553130/pyBKB_v2/BB_MesoWest/MesoWest_latest.py in get_mesowest_latest(stn='NAA', tz='Local', units='English', v=False) |
58 |
59 for U in data['UNITS']: |
=> 60 return_this[U] = {'value':d['OBSERVATIONS'][U+'_value_1']['value'], |
=> 61 'unit':data['UNITS'][U]} |
62 |
return_this = {'DATE': datetime.datetime(2025, 1, 2, 22, 40), 'NAME': u'Neil Armstrong Academy', 'STID': u'NAA', 'URL': 'http://api.mesowest.net/v2/stations/nearesttime?...81f06c9eb&stid=NAA&obtimezone=Local&units=English', u'air_temp': {'unit': u'Fahrenheit', 'value': 41.69}, u'wind_speed': {'unit': u'knots', 'value': 5.95}}, U = u'wet_bulb_temp', d = {u'ELEVATION': u'4260.0', u'ELEV_DEM': u'4252.0', u'ID': u'43136', u'LATITUDE': u'40.71152', u'LONGITUDE': u'-112.01448', u'MNET_ID': u'153', u'NAME': u'Neil Armstrong Academy', u'OBSERVATIONS': {u'air_temp_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 41.69}, u'air_temp_value_2': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 44.22}, u'altimeter_value_1d': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 30.22}, u'clear_sky_solar_radiation_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.0}, u'dew_point_temperature_value_1d': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 29.66}, u'dew_point_temperature_value_2d': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 30.07}, u'evapotranspiration_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.001}, u'photosynthetically_active_radiation_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.0}, u'precip_accum_five_minute_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.0}, u'pressure_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 875.12}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2025-01-03T05:00:00Z', u'start': u'2014-05-27T00:00:00Z'}, u'QC_FLAGGED': False, ...}, data = {u'QC_SUMMARY': {u'PERCENT_OF_TOTAL_OBSERVATIONS_FLAGGED': 0.0, u'QC_CHECKS_APPLIED': [u'sl_range_check'], u'QC_NAMES': {u'1': u'SynopticLabs Range Check'}, u'QC_SHORTNAMES': {u'1': u'sl_range_check'}, u'QC_SOURCENAMES': {u'1': u'SynopticLabs'}, u'TOTAL_OBSERVATIONS_FLAGGED': 0}, u'STATION': [{u'ELEVATION': u'4260.0', u'ELEV_DEM': u'4252.0', u'ID': u'43136', u'LATITUDE': u'40.71152', u'LONGITUDE': u'-112.01448', u'MNET_ID': u'153', u'NAME': u'Neil Armstrong Academy', u'OBSERVATIONS': {u'air_temp_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 41.69}, u'air_temp_value_2': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 44.22}, u'altimeter_value_1d': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 30.22}, u'clear_sky_solar_radiation_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.0}, u'dew_point_temperature_value_1d': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 29.66}, u'dew_point_temperature_value_2d': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 30.07}, u'evapotranspiration_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.001}, u'photosynthetically_active_radiation_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.0}, u'precip_accum_five_minute_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 0.0}, u'pressure_value_1': {u'date_time': u'2025-01-02T22:40:00-0700', u'value': 875.12}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2025-01-03T05:00:00Z', u'start': u'2014-05-27T00:00:00Z'}, u'QC_FLAGGED': False, ...}], u'SUMMARY': {u'DATA_PARSING_TIME': u'0.8 ms', u'DB_QUERY_TIME': u'0 ms', u'METADATA_DB_QUERY_TIME': u'2.7 ms', u'METADATA_PARSE_TIME': u'0.2 ms', u'NUMBER_OF_OBJECTS': 1, u'QC_QUERY_TIME': u'0 ms', u'QUERY_TIME': u'2.7 ms', u'RESPONSE_CODE': 1, u'RESPONSE_MESSAGE': u'OK', u'TOTAL_DATA_TIME': u'3.6 ms', ...}, u'UNITS': {u'air_temp': u'Fahrenheit', u'altimeter': u'INHG', u'clear_sky_solar_radiation': u'W/m**2', u'dew_point_temperature': u'Fahrenheit', u'elevation': u'ft', u'evapotranspiration': u'Inches', u'heat_index': u'Fahrenheit', u'photosynthetically_active_radiation': u'umol/m**2 s', u'position': u'ft', u'precip_accum_five_minute': u'Inches', ...}} |
<type 'exceptions.KeyError'>: u'wet_bulb_temp_value_1'
args =
(u'wet_bulb_temp_value_1',)
message =
u'wet_bulb_temp_value_1'