Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sablea opened this issue Nov 15, 2023 · 0 comments

Comments

@sablea
Copy link

sablea commented Nov 15, 2023

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant