Skip to content

Key Error with Repeated Objectives #46

@eyoung55

Description

@eyoung55

Merging PR #44 seems to have broken the ability to specify repeated objective functions with differing options using the _#XX pattern. When I rewind to the merge of PR #43, the below error is no longer produced.

Using parameter location: multi_farm.yaml
Loading: multi_farm.yaml
Parameter Check Passed
Traceback (most recent call last):
  File "/opt/anaconda3/envs/windse/bin/windse", line 11, in <module>
    load_entry_point('windse', 'console_scripts', 'windse')()
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse_driver/driver.py", line 120, in main
    actions[get_action()]()
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse_driver/driver.py", line 71, in run_action
    params, problem, solver = SetupSimulation(params_loc)
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse_driver/driver_functions.py", line 196, in SetupSimulation
    params = Initialize(params_loc)
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse_driver/driver_functions.py", line 59, in Initialize
    windse.initialize(params_loc,updated_parameters=args.updated_parameters)
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse/__init__.py", line 17, in initialize
    windse_parameters.Load(loc,updated_parameters=updated_parameters)
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse/ParameterManager.py", line 199, in Load
    self.update(self.NestedUpdate(yaml_file))
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse/ParameterManager.py", line 129, in NestedUpdate
    target_dic[key] = self.NestedUpdate(value,subdic=target_dic[key])
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse/ParameterManager.py", line 129, in NestedUpdate
    target_dic[key] = self.NestedUpdate(value,subdic=target_dic[key])
  File "/Users/eyoung/Desktop/remove_this_dir/WindSE/windse/ParameterManager.py", line 129, in NestedUpdate
    target_dic[key] = self.NestedUpdate(value,subdic=target_dic[key])
KeyError: 'point_blockage_#01'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions