object_to statement in persistent model causes a crash
Create this model
a = 2
a to file 'a.yaml'
in a file test.vm
and run it with texts script -f test.vm
. Then texts session -u <uuid>
crashes with this error:
Traceback (most recent call last):
File "vre-language/src/virtmat/language/utilities/errors.py", line 276, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/cli/run_session.py", line 74, in main
mgr = SessionManager(lp_obj, uuid=clargs.uuid, autorun=clargs.autorun,
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 550, in __init__
self.session = Session(lpad, create_new=True, **kwargs)
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 110, in __init__
self.process_models('print(true)')
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 193, in process_models
strns, paths, varies = self._process_strings_paths(model_str, model_path)
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 224, in _process_strings_paths
model_str_ = self._expand_reuse(model_str)
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 232, in _expand_reuse
local_var_names = set(self._get_all_var_names())
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 325, in _get_all_var_names
return set(names)
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 324, in <genexpr>
names = (o for n in nodes for t in n['spec']['_tasks'] for o in t['outputs'])
KeyError: 'outputs'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "python-3.10.12/bin/texts", line 8, in <module>
sys.exit(texts())
File "vre-language/src/virtmat/language/cli/__init__.py", line 25, in texts
clargs.func(clargs)
File "vre-language/src/virtmat/language/utilities/errors.py", line 302, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception