ras2fim
ras2fim copied to clipboard
[2pt] Add a check in `ras2inundation.py` to ensure the flow file is built correctly
When using 2024 04 05 outputs from RAS2FIM and the ras2inundation.py
script and conda environment from latest dev branch (6584be0). The following error is encountered
TypeError: Cannot index by location index with a non-integer key
Details:
=================================================================
RUN Inundation tool
(-g): geocurves directory D:\Users\abdul.siddiqui\workbench\projects\ras2fim_demo\20240405\final\geo_rating_curves
(-f): flow file D:\Users\abdul.siddiqui\workbench\projects\ripple_1d_outputs\flows_harvey.csv
(-t): output inundation gkpg D:\Users\abdul.siddiqui\workbench\projects\ras2fim_demo\20220508\inundation\harvey.gpkg
--- Start: 05/08/2024 18:18:44 (UTC time)
=================================================================
Completed creating a dictionary of available feature_ids and geocurve files.
Derived ras2fim version v2.0.2.0 from geocurve files.
Compiling feature_ids info (discharge, stage, geometry) ...
2024-05-08 18:18:58 <CRITICAL> : Traceback (most recent call last):
File "ras2inundation.py", line 244, in <module>
produce_inundation_from_geocurves(**args)
File "ras2inundation.py", line 131, in produce_inundation_from_geocurves
subset_geocurve = geocurve_df.iloc[row_idx]
File "D:\Users\abdul.siddiqui\AppData\Local\anaconda3\envs\ras2fim\lib\site-packages\pandas\core\indexing.py", line 1103, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "D:\Users\abdul.siddiqui\AppData\Local\anaconda3\envs\ras2fim\lib\site-packages\pandas\core\indexing.py", line 1653, in _getitem_axis
raise TypeError("Cannot index by location index with a non-integer key")
TypeError: Cannot index by location index with a non-integer key