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: the label [Code] is not in the [index] in district-cooling-systems workflow on master #2451

Closed
daren-thomas opened this issue Nov 11, 2019 · 1 comment
Assignees
Labels
bug must-have These requirements are critical and must be included in CEA

Comments

@daren-thomas
Copy link
Member

It stops at the thermal-networks stage:

calculating mass flows in edges... time step 8757
calculating mass flows in edges... time step 8758
calculating mass flows in edges... time step 8759
Traceback (most recent call last):
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\Scripts\cea-script.py", line 11, in <module>
    load_entry_point('cityenergyanalyst', 'console_scripts', 'cea')()
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\interfaces\cli\cli.py", line 66, in main
    script_module.main(config)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\workflows\workflow.py", line 56, in main
    do_script_step(config, step)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\workflows\workflow.py", line 138, in do_script_step
    run(config, py_script, **py_parameters)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\workflows\workflow.py", line 29, in run
    f(config=config, **kwargs)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\api.py", line 52, in __call__
    self._runner.__call__(*args, **kwargs)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\api.py", line 32, in script_runner
    script_module.main(config)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\technologies\thermal_network\thermal_network.py", line 3500, in main
    thermal_network_main(locator, thermal_network, processes=config.get_number_of_processes())
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\technologies\thermal_network\thermal_network.py", line 505, in thermal_network_main
    thermal_network.edge_mass_flow_df = calc_max_edge_flowrate(thermal_network, processes=processes)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\technologies\thermal_network\thermal_network.py", line 1715, in calc_max_edge_flowrate
    pipe_properties_df = assign_pipes_to_edges(thermal_network)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\technologies\thermal_network\thermal_network.py", line 1169, in assign_pipes_to_edges
    pipe_catalog), axis =1)
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\frame.py", line 6014, in apply
    return op.get_result()
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\apply.py", line 142, in get_result
    return self.apply_standard()
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\apply.py", line 248, in apply_standard
    self.apply_series_generator()
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\apply.py", line 277, in apply_series_generator
    results[i] = self.f(v)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\technologies\thermal_network\thermal_network.py", line 1169, in <lambda>
    pipe_catalog), axis =1)
  File "c:\users\darthoma\documents\github\cityenergyanalyst\cea\technologies\thermal_network\thermal_network.py", line 1138, in calc_asign_diameter
    return pipe_catalog.loc[i, 'Code']
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexing.py", line 1472, in __getitem__
    return self._getitem_tuple(key)
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexing.py", line 870, in _getitem_tuple
    return self._getitem_lowerdim(tup)
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexing.py", line 1027, in _getitem_lowerdim
    return getattr(section, self.name)[new_key]
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexing.py", line 1478, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexing.py", line 1911, in _getitem_axis
    self._validate_key(key, axis)
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexing.py", line 1798, in _validate_key
    error()
  File "C:\Users\darthoma\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexing.py", line 1785, in error
    axis=self.obj._get_axis_name(axis)))
KeyError: (u'the label [Code] is not in the [index]', u'occurred at index PIPE0')

district-heating-systems does work, though, so I'm assuming it's probably got to do with the SG region (technology database)

@daren-thomas daren-thomas changed the title district-cooling-systems workflow not running through on master KeyError: the label [Code] is not in the [index] in district-cooling-systems workflow on master Nov 11, 2019
@daren-thomas daren-thomas added bug must-have These requirements are critical and must be included in CEA labels Nov 14, 2019
@daren-thomas
Copy link
Member Author

duplicate of #2477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug must-have These requirements are critical and must be included in CEA
Projects
None yet
Development

No branches or pull requests

2 participants