RTS-GMLC icon indicating copy to clipboard operation
RTS-GMLC copied to clipboard

KeyError occurs when generate `RTS_GMLC.m` from the data in the SourceData folder

Open sablea opened this issue 7 months ago • 0 comments

Run cli.py in the RTS_Data/FormattedData/MATPOWER folder. python cli.py

But a KeyError occurred.

Traceback (most recent call last): File "/home/sablea/anaconda3/envs/pytorch/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Start Heat Cold MMBTU' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "cli.py", line 19, in create(folder = args.folder) File "cli.py", line 8, in create create_rts_MATPOWER_file(folder) File "xxxx/RTS-GMLC/RTS_Data/FormattedData/MATPOWER/script.py", line 213, in create_rts_MATPOWER_file if not np.isnan((g['Start Heat Cold MMBTU'] * g['Fuel Price $/MMBTU']) + g['Non Fuel Start Cost $']) else 0.0 File "/home/sablea/anaconda3/envs/pytorch/lib/python3.8/site-packages/pandas/core/series.py", line 981, in getitem return self._get_value(key) File "/home/sablea/anaconda3/envs/pytorch/lib/python3.8/site-packages/pandas/core/series.py", line 1089, in _get_value loc = self.index.get_loc(label) File "/home/sablea/anaconda3/envs/pytorch/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc raise KeyError(key) from err KeyError: 'Start Heat Cold MMBTU'

sablea avatar Nov 15 '23 09:11 sablea