<type 'exceptions.KeyError'> | Python 2.7.12: /uufs/chpc.utah.edu/sys/installdir/anaconda/4.2.0/bin/python Thu Jan 2 22:50: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 = 'UUSYR', 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='UUSYR', 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, 45), 'NAME': u'Syracuse', 'STID': u'UUSYR', 'URL': 'http://api.mesowest.net/v2/stations/nearesttime?...f06c9eb&stid=UUSYR&obtimezone=Local&units=English'}, U = u'wet_bulb_temp', d = {u'ELEVATION': u'4217.0', u'ELEV_DEM': u'4215.9', u'ID': u'62231', u'LATITUDE': u'41.08847', u'LONGITUDE': u'-112.11880', u'MNET_ID': u'153', u'NAME': u'Syracuse', u'OBSERVATIONS': {u'air_temp_value_1': {u'date_time': u'2025-01-02T22:45:00-0700', u'value': 36.88}, u'air_temp_value_2': {u'date_time': u'2025-01-02T22:45:00-0700', u'value': 39.41}, u'altimeter_value_1d': {u'date_time': u'2025-01-02T22:45:00-0700', u'value': 30.2}, u'ceiling_value_1': {u'date_time': u'2025-01-02T22:00:00-0700', u'value': 24540.0}, u'cloud_layer_1_code_value_1': {u'date_time': u'2025-01-02T22:00:00-0700', u'value': 2450.0}, u'cloud_layer_1_value_1d': {u'date_time': u'2025-01-02T22:00:00-0700', u'value': {u'height_agl': 24500, u'sky_condition': u'N/A'}}, u'cloud_layer_2_code_value_1': {u'date_time': u'2025-01-02T21:20:00-0700', u'value': 2500.0}, u'cloud_layer_2_value_1d': {u'date_time': u'2025-01-02T21:20:00-0700', u'value': {u'height_agl': 25000, u'sky_condition': u'N/A'}}, u'cloud_layer_3_code_value_1': {u'date_time': u'2025-01-02T07:35:00-0700', u'value': 500.0}, u'cloud_layer_3_value_1d': {u'date_time': u'2025-01-02T07:35:00-0700', u'value': {u'height_agl': 5000, u'sky_condition': u'N/A'}}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2025-01-03T04:45:00Z', u'start': u'2017-03-17T19:46: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'4217.0', u'ELEV_DEM': u'4215.9', u'ID': u'62231', u'LATITUDE': u'41.08847', u'LONGITUDE': u'-112.11880', u'MNET_ID': u'153', u'NAME': u'Syracuse', u'OBSERVATIONS': {u'air_temp_value_1': {u'date_time': u'2025-01-02T22:45:00-0700', u'value': 36.88}, u'air_temp_value_2': {u'date_time': u'2025-01-02T22:45:00-0700', u'value': 39.41}, u'altimeter_value_1d': {u'date_time': u'2025-01-02T22:45:00-0700', u'value': 30.2}, u'ceiling_value_1': {u'date_time': u'2025-01-02T22:00:00-0700', u'value': 24540.0}, u'cloud_layer_1_code_value_1': {u'date_time': u'2025-01-02T22:00:00-0700', u'value': 2450.0}, u'cloud_layer_1_value_1d': {u'date_time': u'2025-01-02T22:00:00-0700', u'value': {u'height_agl': 24500, u'sky_condition': u'N/A'}}, u'cloud_layer_2_code_value_1': {u'date_time': u'2025-01-02T21:20:00-0700', u'value': 2500.0}, u'cloud_layer_2_value_1d': {u'date_time': u'2025-01-02T21:20:00-0700', u'value': {u'height_agl': 25000, u'sky_condition': u'N/A'}}, u'cloud_layer_3_code_value_1': {u'date_time': u'2025-01-02T07:35:00-0700', u'value': 500.0}, u'cloud_layer_3_value_1d': {u'date_time': u'2025-01-02T07:35:00-0700', u'value': {u'height_agl': 5000, u'sky_condition': u'N/A'}}, ...}, u'PERIOD_OF_RECORD': {u'end': u'2025-01-03T04:45:00Z', u'start': u'2017-03-17T19:46:00Z'}, u'QC_FLAGGED': False, ...}], u'SUMMARY': {u'DATA_PARSING_TIME': u'1.3 ms', u'DB_QUERY_TIME': u'0 ms', u'METADATA_DB_QUERY_TIME': u'6.1 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.3 ms', u'RESPONSE_CODE': 1, u'RESPONSE_MESSAGE': u'OK', u'TOTAL_DATA_TIME': u'4.7 ms', ...}, u'UNITS': {u'air_temp': 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', u'cloud_layer_2_code': u'code', u'cloud_layer_3': u'Feet', u'cloud_layer_3_code': u'code', u'derived_aerosol_boundary_layer_depth': 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'