Skip to content

[2pt] Add a check in ras2inundation.py to ensure the flow file is built correctly #322

Description

@ar-siddiqui

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is neededras2fim_V2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions