mikegough / 3D-Landscape-Simulator

A web based ST-Sim application with 3D visualization.
0 stars 1 forks source link

Selecting certain counties cause a KeyError #28

Open mikegough opened 7 years ago

mikegough commented 7 years ago

Selecting certain counties (e.g., Nye, in Arizona) causes a KeyError in the conversions.py file:

line 83, in landfire_stateclass_index_raster state_class_type = sc_code_map[bps_code][sc_code]

TaylorMutch commented 7 years ago

@mikegough What's the traceback?

mikegough commented 7 years ago

Traceback (most recent call last): File "C:\Users\Mike\mve\lib\site-packages\django\core\handlers\exception.py", line 39, in inner response = get_response(request) File "C:\Users\Mike\mve\lib\site-packages\django\core\handlers\base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "C:\Users\Mike\mve\lib\site-packages\django\core\handlers\base.py", line 185, in _get_response response = wrapped_callback(request, _callback_args, _callback_kwargs) File "C:\Users\Mike\mve\lib\site-packages\django\views\generic\base.py", line 68, in view return self.dispatch(request, _args, _kwargs) File "F:\Projects2\OSU_BLM_Sagebrush2016\Tasks\Web_Applications\Landscape_Simu lator\3D_Landscape_Simulator\Sagebrush\ST_Sim_Landscape_Simulator\views.py", lin e 56, in dispatch return super().dispatch(request, _args, _kwargs) File "C:\Users\Mike\mve\lib\site-packages\django\views\generic\base.py", line 88, in dispatch return handler(request, _args, _kwargs) File "F:\Projects2\OSU_BLM_Sagebrush2016\Tasks\Web_Applications\Landscape_Simu lator\3D_Landscape_Simulator\Sagebrush\ST_Sim_Landscape_Simulator\views.py", lin e 82, in get sc_conversion_func(veg_path, sc_path, sc_conversion_path) File "F:\Projects2\OSU_BLM_Sagebrush2016\Tasks\Web_Applications\Landscape_Simu lator\3D_Landscape_Simulator\Sagebrush\OutputProcessing\plugins\conversions.py", line 83, in landfire_stateclass_index_raster state_class_type = sc_code_map[bps_code][sc_code] KeyError: 1510060

TaylorMutch commented 7 years ago

Odd. That code is present as a valid BPS code; Not sure why that isn't working...