NOAA-OWP/ras2fim

[8pt] Bug: 0 not in range

Closed this issue · 0 comments

During a recent full scale run, a models threw an exception, based on 12030101 / EPSG:2276


Creating geo rating curves for model 10770_Derrett Cr (Number 8 of 266)
Loading the max inundation extent for each NWM reach for model 10770_Derrett Cr
2024-03-13 22:55:13 : Traceback (most recent call last):
File "C:\Users\rdp-user.conda\envs\ras2fim\lib\site-packages\pandas\core\indexes\range.py", line 345, in get_loc
return self._range.index(new_key)
ValueError: 0 is not in range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\rdp-user.conda\envs\ras2fim\lib\site-packages\geopandas\geodataframe.py", line 317, in set_geometry
level = frame[col]
File "C:\Users\rdp-user.conda\envs\ras2fim\lib\site-packages\geopandas\geodataframe.py", line 1415, in getitem
result = super().getitem(key)
File "C:\Users\rdp-user.conda\envs\ras2fim\lib\site-packages\pandas\core\frame.py", line 3761, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\rdp-user.conda\envs\ras2fim\lib\site-packages\pandas\core\indexes\range.py", line 347, in get_loc
raise KeyError(key) from err
KeyError: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./src/ras2fim.py", line 678, in
init_and_run_ras2fim(**args)
File "./src/ras2fim.py", line 229, in init_and_run_ras2fim
fn_run_ras2fim(
File "./src/ras2fim.py", line 400, in fn_run_ras2fim
manage_geo_rating_curves_production(unit_output_path, overwrite=False)
File "C:\Users\rdp-user\Projects\dev-inundate-unit\ras2fim\src\create_geocurves.py", line 529, in manage_geo_rating_curves_production
create_geocurves(ras2fim_huc_dir, code_version)
File "C:\Users\rdp-user\Projects\dev-inundate-unit\ras2fim\src\create_geocurves.py", line 358, in create_geocurves
split1_inundation = split1_inundation.set_geometry(0, crs=model_crs)
File "C:\Users\rdp-user.conda\envs\ras2fim\lib\site-packages\geopandas\geodataframe.py", line 319, in set_geometry
raise ValueError("Unknown column %s" % col)
ValueError: Unknown column 0