When creating a new row in normunit.csv for residential doors, SFm.py gave an error:
Traceback (most recent call last):
File "C:\Users...\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\indexes\base.py", line 3653, in get_loc
return self._engine.get_loc(casted_key)
File "pandas_libs\index.pyx", line 147, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 176, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 0
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Github\DEER-Prototypes-EnergyPlus-Working\scripts\data transformation\SFm.py", line 451, in
numunits = numunits_vals[0]
File "C:\Users...\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\frame.py", line 3761, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users...\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\indexes\base.py", line 3655, in get_loc
raise KeyError(key) from err
KeyError: 0
I was able to fix this by changing line 451 from
numunits = numunits_vals[0]
to
numunits = list(numunits_vals['Value'])[0]
I still get the following error, but the script does run:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
When creating a new row in normunit.csv for residential doors, SFm.py gave an error:
I was able to fix this by changing line 451 from numunits = numunits_vals[0] to numunits = list(numunits_vals['Value'])[0]
I still get the following error, but the script does run:
MFm.py and DMo.py run successfully with the new normunit.