Extending a model with no variable reference
Let us have a model that we want to extend with something like d = 2
. This is the error message:
Traceback (most recent call last):
File "../scripts/run_remotely.py", line 39, in <module>
session = Session(get_lp(clargs), uuid=clargs.uuid, grammar_path=clargs.grammar_path,
File "/home/ubuntu/vre-language/src/virtmat/language/interpreter/session_manager.py", line 46, in __init__
self.get_model(model_str, model_path)
File "/home/ubuntu/vre-language/src/virtmat/language/interpreter/session_manager.py", line 91, in get_model
self.model = tx_get_model(model_src, deferred_mode=True,
File "/home/ubuntu/python3-venv/lib/python3.8/site-packages/textx/metamodel.py", line 647, in model_from_str
p(model, self)
File "/home/ubuntu/vre-language/src/virtmat/language/interpreter/workflow_executor.py", line 255, in workflow_model_processor
model.lpad.append_wf(Workflow([var.firework]), fw_ids=parents)
File "/home/ubuntu/python3-venv/lib/python3.8/site-packages/fireworks/core/launchpad.py", line 491, in append_wf
wf = self.get_wf_by_fw_id(fw_ids[0])
IndexError: list index out of range
Because no variable is referenced, the created node has no parent node to append to. There should be a root node in the workflow model to solve this issue. Nodes with no refrences should be children of the root node. Also a new session test should capture this case.