<type 'exceptions.KeyError'> | Python 2.7.12: /uufs/chpc.utah.edu/sys/installdir/anaconda/4.2.0/bin/python Wed Nov 20 23:40:01 2024 |
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 = 'UKBKB', 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='UKBKB', 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(2024, 11, 20, 23, 30), 'NAME': u'EW2355 Spanish Fork', 'STID': u'UKBKB', 'URL': 'http://api.mesowest.net/v2/stations/nearesttime?...f06c9eb&stid=UKBKB&obtimezone=Local&units=english', u'air_temp': {'unit': u'Fahrenheit', 'value': 40.0}, u'wind_speed': {'unit': u'knots', 'value': 4.34}}, U = u'wet_bulb_temp', d = {u'ELEVATION': u'4734.0', u'ELEV_DEM': u'4740.8', u'ID': u'37032', u'LATITUDE': u'40.09867', u'LONGITUDE': u'-111.62767', u'MNET_ID': u'65', u'NAME': u'EW2355 Spanish Fork', u'OBSERVATIONS': {u'air_temp_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 40.0}, u'altimeter_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 30.23}, u'dew_point_temperature_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 8.47}, u'precip_accum_24_hour_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 0.0}, u'precip_accum_since_local_midnight_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 0.0}, u'pressure_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 860.2}, u'relative_humidity_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 27.0}, u'sea_level_pressure_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 1024.33}, u'wet_bulb_temp_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 29.48}, u'wind_cardinal_direction_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': u'WSW'}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2024-11-21T05:30:00Z', u'start': u'2013-03-13T00: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'4734.0', u'ELEV_DEM': u'4740.8', u'ID': u'37032', u'LATITUDE': u'40.09867', u'LONGITUDE': u'-111.62767', u'MNET_ID': u'65', u'NAME': u'EW2355 Spanish Fork', u'OBSERVATIONS': {u'air_temp_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 40.0}, u'altimeter_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 30.23}, u'dew_point_temperature_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 8.47}, u'precip_accum_24_hour_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 0.0}, u'precip_accum_since_local_midnight_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 0.0}, u'pressure_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 860.2}, u'relative_humidity_value_1': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 27.0}, u'sea_level_pressure_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 1024.33}, u'wet_bulb_temp_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': 29.48}, u'wind_cardinal_direction_value_1d': {u'date_time': u'2024-11-20T23:30:00-0700', u'value': u'WSW'}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2024-11-21T05:30:00Z', u'start': u'2013-03-13T00:00:00Z'}, u'QC_FLAGGED': False, ...}], u'SUMMARY': {u'DATA_PARSING_TIME': u'0.7 ms', u'DB_QUERY_TIME': u'0 ms', u'METADATA_DB_QUERY_TIME': u'2.6 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'6.0 ms', u'RESPONSE_CODE': 1, u'RESPONSE_MESSAGE': u'OK', u'TOTAL_DATA_TIME': u'6.7 ms', ...}, u'UNITS': {u'air_temp': u'Fahrenheit', u'altimeter': u'INHG', u'dew_point_temperature': u'Fahrenheit', u'elevation': u'ft', u'heat_index': u'Fahrenheit', u'position': u'ft', u'precip_accum_24_hour': u'Inches', u'precip_accum_since_local_midnight': u'Inches', u'pressure': u'Millibars', u'relative_humidity': u'%', ...}} |
<type 'exceptions.KeyError'>: u'wet_bulb_temp_value_1'
args =
(u'wet_bulb_temp_value_1',)
message =
u'wet_bulb_temp_value_1'