<type 'exceptions.KeyError'> | Python 2.7.12: /uufs/chpc.utah.edu/sys/installdir/anaconda/4.2.0/bin/python Wed Jan 8 03:53:23 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 = 'KCHO', 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='KCHO', 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, 8, 5, 40), 'NAME': u'Charlottesville-Albemarle Airport', 'STID': u'KCHO', 'URL': 'http://api.mesowest.net/v2/stations/nearesttime?...1f06c9eb&stid=KCHO&obtimezone=Local&units=English', u'air_temp_low_6_hour': {'unit': u'Fahrenheit', 'value': 24.98}}, U = u'wet_bulb_temp', d = {u'ELEVATION': u'640.0', u'ELEV_DEM': u'613.5', u'ID': u'4451', u'LATITUDE': u'38.13738', u'LONGITUDE': u'-78.45516', u'MNET_ID': u'1', u'NAME': u'Charlottesville-Albemarle Airport', u'OBSERVATIONS': {u'air_temp_high_24_hour_value_1': {u'date_time': u'2025-01-07T23:53:00-0500', u'value': 35.06}, u'air_temp_high_6_hour_value_1': {u'date_time': u'2025-01-08T00:53:00-0500', u'value': 30.02}, u'air_temp_low_24_hour_value_1': {u'date_time': u'2025-01-07T23:53:00-0500', u'value': 24.98}, u'air_temp_low_6_hour_value_1': {u'date_time': u'2025-01-08T00:53:00-0500', u'value': 24.98}, u'air_temp_value_1': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': 19.4}, u'altimeter_value_1': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': 30.19}, u'ceiling_value_1': {u'date_time': u'2025-01-06T23:45:00-0500', u'value': 3700.0}, u'cloud_layer_1_code_value_1': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': 1.0}, u'cloud_layer_1_value_1d': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': {u'height_agl': None, u'sky_condition': u'clear'}}, u'cloud_layer_2_code_value_1': {u'date_time': u'2025-01-06T22:15:00-0500', u'value': 1102.0}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2025-01-08T10:10:00Z', u'start': u'2002-08-14T00: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'640.0', u'ELEV_DEM': u'613.5', u'ID': u'4451', u'LATITUDE': u'38.13738', u'LONGITUDE': u'-78.45516', u'MNET_ID': u'1', u'NAME': u'Charlottesville-Albemarle Airport', u'OBSERVATIONS': {u'air_temp_high_24_hour_value_1': {u'date_time': u'2025-01-07T23:53:00-0500', u'value': 35.06}, u'air_temp_high_6_hour_value_1': {u'date_time': u'2025-01-08T00:53:00-0500', u'value': 30.02}, u'air_temp_low_24_hour_value_1': {u'date_time': u'2025-01-07T23:53:00-0500', u'value': 24.98}, u'air_temp_low_6_hour_value_1': {u'date_time': u'2025-01-08T00:53:00-0500', u'value': 24.98}, u'air_temp_value_1': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': 19.4}, u'altimeter_value_1': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': 30.19}, u'ceiling_value_1': {u'date_time': u'2025-01-06T23:45:00-0500', u'value': 3700.0}, u'cloud_layer_1_code_value_1': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': 1.0}, u'cloud_layer_1_value_1d': {u'date_time': u'2025-01-08T05:40:00-0500', u'value': {u'height_agl': None, u'sky_condition': u'clear'}}, u'cloud_layer_2_code_value_1': {u'date_time': u'2025-01-06T22:15:00-0500', u'value': 1102.0}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2025-01-08T10:10:00Z', u'start': u'2002-08-14T00:00:00Z'}, u'QC_FLAGGED': False, ...}], u'SUMMARY': {u'DATA_PARSING_TIME': u'1.7 ms', u'DB_QUERY_TIME': u'0 ms', u'METADATA_DB_QUERY_TIME': u'4.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'3.0 ms', u'RESPONSE_CODE': 1, u'RESPONSE_MESSAGE': u'OK', u'TOTAL_DATA_TIME': u'4.8 ms', ...}, u'UNITS': {u'air_temp': u'Fahrenheit', u'air_temp_high_24_hour': u'Fahrenheit', u'air_temp_high_6_hour': u'Fahrenheit', u'air_temp_low_24_hour': u'Fahrenheit', u'air_temp_low_6_hour': u'Fahrenheit', u'altimeter': u'INHG', u'ceiling': u'Feet', u'cloud_layer_1': u'Feet', u'cloud_layer_1_code': u'code', u'cloud_layer_2': u'Feet', ...}} |
<type 'exceptions.KeyError'>: u'wet_bulb_temp_value_1'
args =
(u'wet_bulb_temp_value_1',)
message =
u'wet_bulb_temp_value_1'