USEPA / standardizedinventories

Standardized Release and Waste Inventories
MIT License
25 stars 16 forks source link

KeyError in `combineFullInventories` #155

Open bl-young opened 5 months ago

bl-young commented 5 months ago

Action indicates KeyError in combineFullInventories for:

name = 'TRI_DMR_2017', compartment = 'water'
inv_dict = {'DMR': '2017', 'TRI': '2017'}
stewicombo/__init__.py:53: in combineFullInventories
    inventories = aggregate_and_remove_overlap(inventories)
stewicombo/overlaphandler.py:108: in aggregate_and_remove_overlap
    df = df.drop(df_nans.index)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pandas/core/frame.py:5568: in drop
    return super().drop(
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pandas/core/generic.py:4782: in drop
    obj = obj._drop_axis(labels, axis, level=level, errors=errors)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pandas/core/generic.py:4824: in _drop_axis
    new_axis = axis.drop(labels, errors=errors)
KeyError: '[193509, 193510, 193515, 193516, 193517, 193518, 193519, 193520, 193521, 193522, 193523, 193524, 193525, 193526, 193527, 193528, ....
194270, 194271, 194272, 194273, 194274, 194275, 194276, 194277, 194278, 194279, 194280, 194281, 194282, 194283, 194284, 194285] not found in axis'

Has popped up in the action since the release of pandas 2.2. See: https://github.com/USEPA/standardizedinventories/actions/runs/7645927417/job/20833607307